Try to search your question here, if you can't find : Ask Any Question Now ?

what does [1] works in this snippet of code?what does it mean

HomeCategory: stackoverflowwhat does [1] works in this snippet of code?what does it mean
Avatarjulie asked 3 months ago

i want to store marks in float in list..but when i do this

a_list.append([input("name of students"),float(input("marks scored 
then i got value error

ValueError: could not convert string to float:

what should i do????

this is my whole code..

”’ got input from user in seprate name and marks list then making
them in list of list..”’

a_list = []

for i in range(0, int(input("no of input" ))):
a_list.append([input("name of students"),input("marks scored by 

'''to get second highest marks got from list of input by user and 
augment them in list of list'''

second_highest = sorted(list(set([marks for name, marks in 
print('n'.join([a for a , b in sorted(a_list) if b == 
1 Answers
Best Answer
AvatarArben answered 3 months ago
Your Answer

18 + 7 =

Popular Tags

WP Facebook Auto Publish Powered By :