[Tutor] How to get two user inputs in same prompt seperated by a special character?
Santosh Kumar
sntshkmr60 at gmail.com
Sat Jul 14 05:46:56 CEST 2012
Like in my script:
#!/usr/bin/env python
#-*- coding:utf-8 -*-
print "You will be prompted to enter your height in feet and inches."
height_in_feet = input("How much feet are you long: ")
remaining_inches = input("How much inches remained? ")
inches_in_feet = height_in_feet * 12
total_height_in_inches = inches_in_feet + remaining_inches
print "You are %d inches long." % total_height_in_inches
Here I want something like:
Enter you height in format like 5' 10"
More information about the Tutor
mailing list