convert a number to a string

Post Reply
lokesh1
Posts: 36
Joined: Sun Mar 31, 2019 4:22 pm

convert a number to a string

Post by lokesh1 » Wed Apr 17, 2019 3:38 pm

How you can convert a number to a string?

sai
Posts: 25
Joined: Mon Apr 01, 2019 10:52 am

Re: convert a number to a string

Post by sai » Wed Apr 17, 2019 3:58 pm

In order to convert a number into a string, use the inbuilt function str(). If you want a octal or hexadecimal representation, use the inbuilt function oct() or hex().

Post Reply

Return to “Python Modules and Packages”