I had no idea that there was any effort behind unicode strings in python. I thought all I'd have to do was put a 'u' before the strings when I first declared them. Good fun. Hopefully I haven't missplaced an error like last time. I'm fairly sure this is good to go though.
Code could be a little more compact, a few lines could be combined into something smaller, but I think this is easier on the eyes.
# -*- coding: utf-8 -*-
inputText="" # incase of IOError
except IOError: print "Whoa whoa, where's your bhaarat.text?"
for items in inputText:
att=0 # Generic counter
for items in langs:
if items.lower() == 's' or items.lower() == 'h':
if items.lower() == 'hindi': outputText += "%i. %s (%s)\n" %(att,items,Hindi)
elif items.lower() == 'sanskrit': outputText += "%i. %s (%s)\n" %(att,items,Sanskrit)
else: outputText+="%i. %s\n" %(att,items)
if inputText[-1].startswith('23'): None # Don't want to do this more then once
else: open('bhaarat.text','a').write("23. English")