variables - Printing selective elements -


i new python , coding in general. i've been coding 2 months , i'm working on first simple game. in game control army , can attack cities , upgrade army money conquering cities.

there places in code want selectively print elements give player options:

  • a list cities can attacked
  • a list upgrades can bought

i want display upgrades , cities still available (so print upgrades haven't been bought yet , cities haven't been conquered yet).

how can print out cities , upgrades available?

thanks!

i recommend use multidimensional lists, similar post: how define two-dimensional array in python

you can define lists name first, , availability second argument. loop through lists..

away lists... such task, recommend classes , object oriented programming.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -