Welcome to Westonci.ca, your ultimate destination for finding answers to a wide range of questions from experts. Experience the ease of finding reliable answers to your questions from a vast community of knowledgeable experts. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.

Write a program named split_me.py that accepts a string in the format Age.FirstName and returns the value FirstName is Age years old. Length of Mary is X. Example: 22.Mary >> Mary is 22 years old. Length of Mary is 4

Sagot :

age,name = input('Enter a string: ').split('.')

print(name+' is '+age+' years old. Length of '+name+' is '+str(len(name)))

I wrote my code in python 3.8. I hope this helps.