Created
September 19, 2015 19:40
-
-
Save njadhav1/f0e26975a109e1d340ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
days=['yesterday', 'today','tomorrow','dayafter'] | |
days_one=days[0] | |
days_two=days[1] | |
days_three=days[2] | |
days_four=days[3] | |
print "Give list is {} , {} ,{}, {}".format(days_one,days_two,days_three,days_four) | |
format_days_one=days_one[0].swapcase()+days_one[1:] | |
format_days_two=days_two[:2].swapcase()+days_two[2:] | |
format_days_three=days_three[:3].swapcase()+days_three[3:] | |
format_days_four=days_four[:4].swapcase()+days_four[4:] | |
print "Your Output is :- \n{}, \n{} ,\n{} ,\n{} ".format(format_days_one,format_days_two,format_days_three,format_days_four) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment