[Tutor] Dictionary

James Reynolds eire1130 at gmail.com
Sun Jun 17 21:38:42 CEST 2012


Does this language have grammar independent of english?

If no, just use .split() on the string and loop through that.

If yes, well, its much more complicated
On Jun 17, 2012 2:27 PM, "Selby Rowley-Cannon" <selbyrowleycannon at ymail.com>
wrote:

> Version: 2.7
> OS: Ubuntu 12.04 LTS
>
> I am writing a small translation app for Rydish (A language that exists in
> the same way Klingon does, invented by my company for a[n] RPG).
> Here is my current method of translation:
>
> Edictionary = {'English keys':'Rydish values'}
> TextEng = raw_input('Please enter your text: ')
> if TextEng in Edictionary:
>     print(TextEng + ' traslates to ' + Edictionary[TextEng])
>
> But I have found that this is only going to translate one word at a time.
> I thought about a loop of somesort, but I can't seem to find one that won't
> still force the user to translate one word at a time. Can anyone tell me
> how to translate a full sentance/several sentances?
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120617/9b9de4cf/attachment-0001.html>


More information about the Tutor mailing list