Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Python :: base64 encode image in python 
Python :: The most appropriate graph for your data 
Python :: get a list of colors that appear of the image python 
Python :: dropdown menu with selenium python 
Python :: pythonanywhere API example 
Python :: read sharepoint list using python 
Python :: example of transformer 
Python :: update value in xml python 
Python :: how to import modules from upper or previous dir in py 
Python :: Horizontal concatication 
Python :: pyqt qwidget background color 
Python :: quit block in python 
Python :: extract metadata from xml tei file python 
Python :: python dummy command 
Python :: get_string python 
Python :: pyqgis 
Python :: if user_answer==answer: ecpeted index erroe pythin fx 
Python :: python stopwords not defined 
Python :: how to maximize pandas output python 
Python :: list loop get previous element 
Python :: inject dynamic value into string python 
Python :: explorer gives new window 
Python :: how to get entitys of word using pytho nlp 
Python :: Return an RDD containing all pairs of elements with matching keys in self and other. 
Python :: open chrome with python stack overflow 
Python :: convert excel cellname to index python 
Python :: numpy collapse last dimension 
Python :: comment a lot of lines python vscode 
Python :: i for i 
Python :: urllib.error.HTTPError: HTTP Error 502 docker redis 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =