if "something" in "something"

This is the place for queries that don't fit in any of the other categories.

if "something" in "something"

Postby el_manu » Mon Aug 26, 2013 7:05 am

Code: Select all
a = isupper(input("Music? "))
if "H" in a:
   print("That's not music!")


my code


yeah and how can i get the input in capital letters???

because part of question is program that asks the user for a string in capital letters
el_manu
 
Posts: 87
Joined: Mon Aug 19, 2013 8:30 am

Re: if "something" in "something"

Postby stranac » Mon Aug 26, 2013 7:15 am

Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
stranac
 
Posts: 1151
Joined: Thu Feb 07, 2013 3:42 pm

Re: if "something" in "something"

Postby el_manu » Mon Aug 26, 2013 7:17 am

i still don't get what it says on that website
el_manu
 
Posts: 87
Joined: Mon Aug 19, 2013 8:30 am

Re: if "something" in "something"

Postby stranac » Mon Aug 26, 2013 7:22 am

Code: Select all
>>> 'something'.upper()
'SOMETHING'


Most of your questions seem very simple.
I think you should read the python tutorial or a beginners book.
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
stranac
 
Posts: 1151
Joined: Thu Feb 07, 2013 3:42 pm


Return to General Coding Help

Who is online

Users browsing this forum: W3C [Linkcheck] and 4 guests

cron