Forum » Programiranje » [Python] Pomoč pri strukturni spremembi (~pliz~help~)
[Python] Pomoč pri strukturni spremembi (~pliz~help~)
HotBurek ::
Dobro jutro.
Evo fanjte, nov dan nov izziv.
Tokrat imam sledečo situacijo.
In tisto, kar me matra, je tale "ukaz":
Katerega bi želel spremenit v tole:
Potrebna je strukturna sprememba. Katera? Pliz help.
Evo fanjte, nov dan nov izziv.
Tokrat imam sledečo situacijo.
# dictionary
dict_au = { "en": "Australia", "sl": "Avstralija" };
if language in dict_au.keys():
full_country_name = dict_au[language];
elif default_language in dict_au.keys():
full_country_name = dict_au[default_language];
else:
full_country_name = "";In tisto, kar me matra, je tale "ukaz":
dict_au
Katerega bi želel spremenit v tole:
dict[language]
Potrebna je strukturna sprememba. Katera? Pliz help.
root@debian:/# iptraf-ng
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
- spremenilo: HotBurek ()
HotBurek ::
Evo, sem že rešil.
Test sample:
Sm vedu, da ne bo tolk težk.
Test sample:
dict_country_names_by_lang = {
"au": { "en": "Australia", "sl": "Avstralija" },
"at": { "en": "Austria", "sl": "Avstrija" },
};
print(dict_country_names_by_lang["at"]["sl"]);Sm vedu, da ne bo tolk težk.
root@debian:/# iptraf-ng
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
Zgodovina sprememb…
- spremenilo: HotBurek ()
Vredno ogleda ...
| Tema | Ogledi | Zadnje sporočilo | |
|---|---|---|---|
| Tema | Ogledi | Zadnje sporočilo | |
| » | Kako se lotit case insensitive "find and replace"?Oddelek: Programiranje | 1119 (677) | Dane0 |
| » | [Python3] Sortiranje 2D dict-a?Oddelek: Programiranje | 1386 (1099) | marska83 |
| » | Python - pomoč (strani: 1 2 3 )Oddelek: Programiranje | 19185 (9933) | black ice |
| » | python osnovaOddelek: Programiranje | 2558 (1871) | detroit |
| » | python pomočOddelek: Programiranje | 955 (764) | Isotropic |