def human2bytes(s):
symbols = ('<STR_LIT:B>', '<STR_LIT>', '<STR_LIT:M>', '<STR_LIT>', '<STR_LIT:T>', '<STR_LIT:P>', '<STR_LIT:E>', '<STR_LIT>', '<STR_LIT:Y>')<EOL>letter = s[-<NUM_LIT:1>:].strip().upper()<EOL>num = s[:-<NUM_LIT:1>]<EOL>assert num.isdigit() and letter in symbols, s<EOL>num = float(num)<EOL>prefix = {symbols[<NUM_LIT:0>]: <NUM_LIT:1>}<EOL>for i, s in enumerate(symbols[<NUM_LIT:1>:]):<EOL><INDENT>prefix[s] = <NUM_LIT:1> << (i + <NUM_LIT:1>) * <NUM_LIT:10><EOL><DEDENT>return int(num * prefix[letter])<EOL>
>>> human2bytes('1M')
1048576
>>> human2bytes('1G')
1073741824