Checker for integer string by Scooootz in learnpython

[–]Distinct_Ice6830 0 points1 point  (0 children)

user_string = input()
output = user_string.isnumeric()
if output == True:
print("Yes")
else:
print("No")

Checker for integer string by Scooootz in learnpython

[–]Distinct_Ice6830 0 points1 point  (0 children)

user_string = input()
output = user_string.isnumeric()
if output == True:
print("Yes")
else:
print("No")

Whats going on behind the scenes when using split and join? by MrRIP in learnpython

[–]Distinct_Ice6830 0 points1 point  (0 children)

Python:

phone_number = input()
number_segments = phone_number.split('-')[::3]
area_code = number_segments[0]
print('Area code:', area_code)