Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions 21 checkstringezoa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
text=input("Enter the text")
''' in order to eliminate all space around of this text '''
text=text.strip()
if len(text)<1 :
print("input a new text")
else :
if all(text[i] in "0123456789" for i in range(len(text))) :
'''in order to compare all element in table with set digit'''
print("it is an integer")
'''compare this number if they are not a sign'''
elif text[0] in "-+" and all(text[i] in "0123456789" for i range (1,len(text))):
print("it is an integer")
else :
print("it is an string"


n=input("write a number")
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change

if n==1:
print("first day of mnonth")
else:
print()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.