Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PythonTuple
#Python 2.7.17 #this code is created by Rezaul Hoque on October 09,2021;contact: jewelmrh@yahoo.com #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; print \ """ |||||||||||||||||||||||||||| """ pTuple=("Python","Tuple" ,"October",9, 2021, 14.40) #tuple constructor with one item day=tuple(("Time", )) #adding day tuple to pTuple pTuple += day # adding item to tuple: first convert it into list,then append item and finally convert the new list into tuple again add=list(pTuple) add.append(":") add.append(" ") pTuple=tuple(add) #adding tuples hr=pTuple[6]+pTuple[8]+pTuple[7] head=pTuple[0]+pTuple[8]+pTuple[1] #accessing tuple elements print(head[0:]) print(pTuple[2]) print(pTuple [3]) print(",") print(pTuple [4]) print(hr) print(pTuple[5]) print \ """ |||||||||||||||||||||||||||| """
run
|
edit
|
history
|
help
0
1 to 101 : Decimal, Octal, Hexadecimal and Binary Format
python bois
gameboy
Python
tes umur
Aufgabe 16
PyClass
fb_series
single_digit_5
Counter() in collections