Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ii:labs:02:tasks:01 [2022/11/17 12:11]
radu.mantu [01. [25p] Intro, datatypes and more]
ii:labs:02:tasks:01 [2024/10/25 01:48] (current)
radu.mantu
Line 325: Line 325:
 >>>​ list(t) >>>​ list(t)
 ['​pi',​ 3.1415, True] ['​pi',​ 3.1415, True]
->>>​ list(t) + [ '​e',​ .5772, True ] +>>>​ list(t) + [ '​e', ​2.7182, True ] 
-['​pi',​ 3.1415, True, '​e', ​0.5772, True]+['​pi',​ 3.1415, True, '​e', ​2.7182, True]
  
 >>>​ # similarly, a tuple can be generated from a list >>>​ # similarly, a tuple can be generated from a list
->>>​ tuple(list(t) + [ '​e',​ .5772, True ]) +>>>​ tuple(list(t) + [ '​e', ​2.7182, True ]) 
-('​pi',​ 3.1415, True, '​e', ​0.5772, True)+('​pi',​ 3.1415, True, '​e', ​2.7182, True)
  
 >>>​ # tuples can be used as a shortcut to assign multiple values at once >>>​ # tuples can be used as a shortcut to assign multiple values at once
ii/labs/02/tasks/01.1668679907.txt.gz · Last modified: 2022/11/17 12:11 by radu.mantu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0