+ 1
What is the diference bewteen ( ) and [ ]. For example: in a list. Python 3
I have a problem that is : list = [1, 1, 2, 3, 5, 8, 13] print (list[list[4]]) And I don't understand it. Because I don't understand the difference bewteen ( ) and [ ] â„
2 Answers
+ 8
[] is a list, () is a tuple. It is well explained in the course, read it before asking next time.
Also, this question has been asked before, use the searchbar next time please.
https://www.sololearn.com/discuss/461845/?ref=app
https://www.sololearn.com/discuss/157953/?ref=app
https://www.sololearn.com/discuss/2143827/?ref=app
https://www.sololearn.com/discuss/1820470/?ref=app
https://www.sololearn.com/discuss/118783/?ref=app
https://www.sololearn.com/discuss/1899635/?ref=app
https://www.sololearn.com/discuss/1518680/?ref=app
+ 4
Thank you. I will try to be more cautelous next time :)