News Ticker

Menu

Understanding Tuples In Python



Tuple is sequence just the same way like lists. Otherwise the whole set of elements is enclosed in parentheses instead of square brackets, unlike list. The tuples cannot be changed unlike lists and tuples use parentheses, mean while lists use square brackets.

Tuples can be used for representing what other languages often call records, some related information that belongs together, like your employees record. There is no description of what each of these fields means, but we can guess.

Creating a tuple is as simple as putting different comma-separated values. Optionally you can put these comma-separated values between parentheses also.


Share This:

Uncle Noobee

Uncle Noobee - Editor of Noobsquare.com , loves science and technology specially internet. Sees internet as the largest university with millions of students. Every students have rights to learn their own subject and to master it.

No Comment to " Understanding Tuples In Python "

  • To add an Emoticons Show Icons
  • To add code Use [pre]code here[/pre]
  • To add an Image Use [img]IMAGE-URL-HERE[/img]
  • To add Youtube video just paste a video link like http://www.youtube.com/watch?v=0x_gnfpL3RM