a = [int(i) for i in input("Enter list of numbers: ").split()]
please explain this line in detail
#First input function accept user input
#Then split function creates a list of characters from the user input
#Next the int function converts all the character to integers using the for loop
a = [int(i) for i in input("Enter list of numbers: ").split()]
Comments
Leave a comment