+ 2
How's the better way to learn lists and dictionary's in Python?
some tips or anything to make easier...
4 ответов
+ 4
Learn by heart, and read it even ten times with understanding:
list = [] #list always has brackets []
tuple = () #tuple always has parenthesis ()
dictionary = {} #dictionary always has curly braces {}. In dictionary u must always assign values as: 'key': 'value'.
E.x:
dic = {'a': 1, 'b': 2, 'c': 3, 'd': '4'}
+ 2
simple list is similar to array
dictionary contains key and values
see solo learn course and practice some examples on it
+ 2
I think Sololearn explains it clearly enough, at least on the basic level. If you want to dig into it and learn more on lists and other data structures, there is no better place than original Python documentation:
https://docs.python.org/3.1/tutorial/datastructures.html
+ 1
In addition I would read or watch different explanations ie. Google and YouTube the issues, read, watch, and use IDLE to explore and experiment. Practice makes perfect. Good luck and Cheers!
PS! TommyL has a good thing going