All pastes #418116 Raw Edit

Stuff

public python v1 · immutable
#418116 ·published 2007-03-31 12:30 UTC
rendered paste body
keyboard = ['q','q','w','e','r','t','y','u','i','o','p','[',']','a','s','d','f','g','h','j','k','l',';','\'','z','x','c','v','b','n','m',',','.','/','\\']direction = raw_input('direction [l/r]? ')instring = raw_input('input? ')outstring = ''for char in instring:    try:      where = keyboard.index(char)      if direction == 'r':        if char.lower() == char:            outstring += keyboard[where+1]        else:          outstring += (keyboard[where+1]).upper()      else:        if char.lower() == char:            outstring += keyboard[where-1]        else:          outstring += (keyboard[where-1]).upper()      except Exception:      outstring += charprint outstring