![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Feb 2005
Posts: 86
Rep Power: 0
![]() |
case sensative
can you make python not case sensative?
i have python2.0 |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I doubt it. Why would you want to do that, anyway?
|
|
|
|
|
|
#3 |
|
Expert Programmer
|
I'm sure you could if you messed with the source code, but it would take a hell of a lot of work. Get used to case sensitive, it makes life orginized
![]() |
|
|
|
|
|
#4 | |
|
Programmer
Join Date: Feb 2005
Posts: 86
Rep Power: 0
![]() |
Quote:
if a == "ball" or a == "cat" that was an example, but i had a program were it would ask you yes or no and i wanted it to except "yes" and "Yes" and respond the same thing without having to type each one out indevidualy |
|
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Ah... that's not making Python case-sensitive - that's making your program case sensitive. To do it, just convert it to lowercase, and test it like that:
import string # this makes your program include the string functions
a = string.lower(raw_input("Type either ball, cat, dog, or eat:")) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|