Re: I want to lirn pithon but pithon doesn't want me to do so

Lists are arrays. If you want to do what you're calling string lists, use a dict:

x = dict()
x["foo"] = 5

Or:

x = {
    "foo": 5,
    "bar": 12,
    "the_player": player,
}

Iterating (for i in my_dict) gives the keys. Usually people will do:

for k, v in my_dict.items():
    # stuff

SO that they can get both at once (k is the key, v is the value, I wouldn't get into how .items() works, just use it).



-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : bhanuponguru via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector

Reply via email to