When i try to use this function:
def dec_to_bin():
decimal = raw_input('Input a number: ')
a = bin(decimal)
print(a)
It gives an error:::::
a = bin(decimal) TypeError: 'str' object can not be interpreted as an index
how can i fix this?