''' this code is use for convert string to integer Check also type of data ''' data="123" number=int(data) print data print type(data) print number print type(number)
Output:
123 < type 'str'> 123 < type 'int' >
''' this code is use for convert string to integer Check also type of data ''' data="123" number=int(data) print data print type(data) print number print type(number)
123 < type 'str'> 123 < type 'int' >
0 comments:
Post a Comment