string help
john boy
xray_alpha_charlie at yahoo.com
Mon Nov 14 15:46:22 EST 2005
using the following program:
prefixes = "JKLMNOPQ"
suffix = "ack"
for letter in prefixes:
print letter + suffix
if prefixes == "O" or "Q"
print letter + "u" + suffix
For this program I am trying to combine the individual letters with the suffix to form names...but for O and Q I need to add in a "u" so the spelling is correct...I am having a hard time pulling just the O and Q out of the list of letters for manipulation...instead it is adding "u" to all the letters when combining with the suffix...apparently its due the fact that O and Q are present in the entire "string"......anybody have some suggestions for this??...
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051114/8b67e499/attachment.html>
More information about the Python-list
mailing list