Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Read a string with digits from the input and convert each number to an integer. Create a list in which you should include only odd digits.

string_number = (input())
odd_number =  [int(i) for i in string_number if int(i) % 2 != 0] 
print(odd_number)
 
PREVIOUS NEXT
Tagged: #Read #string #digits #input #convert #number #Create #list #include #odd
ADD COMMENT
Topic
Name
6+6 =