Python Beginners Tutorial | 3 | 10-02-2012, 05:29 PM
#1
![[Image: attachment-0001.png]](http://mail.python.org/pipermail/pythonmac-sig/attachments/20060321/9f67b59a/attachment-0001.png)
![[Image: tqpbe.png]](http://i.imgur.com/tqpbe.png)
Hello, and welcome AF,
Sorry for not been posting that much as i maybe told
![Wink Wink](https://sinister.ly/images/smilies/set/wink.png)
Have been some things at school and etc, but now im back :blackhat:
So, today well be covering a few more things related to lists and much more so lets begin.
Last time we created a list right? with the simple command:
listname = [1,4,5,6,7,8,9,10]
And we went through how it counts, it starts at 0 not at 1.
And today, i will show you a new one called a 'Tuple' a tuple is basically the same thing as a list, the only difference is that you cant do a s'it with the tuples, the only thing you can use them for is to call the values back, so how do we create a tuple? Well, its fairly easy:
slu=(5,376,65,267,984)
And then we have our tuple, how do you recall the command? Well with the same as with the lists:
slu[2]
Will give back 65. So, what can you use these for? Maybe a game were the different damage values are saved in a tuple and printed out when the "slu[2]" command is executed? I dont know
![Wink Wink](https://sinister.ly/images/smilies/set/wink.png)
Anyways, lets move on.
A few commands you can use for your lists:
Code:
len(listname)
Code:
max(listname)
Code:
min(listname)
I think you know what is means
![Wink Wink](https://sinister.ly/images/smilies/set/wink.png)
And then one of the more useful commands, the 'list'
its used like this:
Code:
list('string or name/word, number etc')
It will then make a list of the word string or whatever you entered, please try it in the Shell
![Smile Smile](https://sinister.ly/images/smilies/set/smile.png)
Im sorry this isn't maybe the best and most good-looking tutorial so far, but ive thought about one thing, and i think i will start with making video tutorials instead of writing them down, since it doesnt take that alot of time to just render and explain than it takes to write things down, if some of you dont like it or want me to do another way, please let me know.
And ofc i will let you have the codes for every episode, so you wont miss anything
![Wink Wink](https://sinister.ly/images/smilies/set/wink.png)
Well, so i think thats everything for today. Please check out my next thread, I will be posting some, maybe great stuff for some of you on that one.
To the next meet, please have a good time! :blackhat:
(This post was last modified: 10-02-2012, 06:01 PM by SLUAST.)
![[Image: attachment-0001.png]](http://mail.python.org/pipermail/pythonmac-sig/attachments/20060321/9f67b59a/attachment-0001.png)