+ 1

tuple initialization

how to initialize tuple, to get input values in it?(to scan values into tuples) like.. #some initialization# input(my_tuple())

16th Jul 2018, 12:45 PM
supraja
supraja - avatar
5 odpowiedzi
+ 3
x=tuple(input()) print(x) let input is hello #output=('h','e','l','l','o')
16th Jul 2018, 5:08 PM
Maninder $ingh
Maninder $ingh - avatar
+ 1
@Maninder Singh thank you
17th Jul 2018, 1:03 AM
supraja
supraja - avatar
0
name = (input(), input()) (Dont working at code playground)
16th Jul 2018, 12:52 PM
hyred
hyred - avatar
0
could u explain me clearly (I want to take input (few no. of)elements into tuple then the code would be??) with example
16th Jul 2018, 2:22 PM
supraja
supraja - avatar
0
Henridoh70 if I want to take 8 input elements into tuple, then should I include 8 input functions in 'name'??
16th Jul 2018, 2:26 PM
supraja
supraja - avatar