Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

decimal to octal in python

dec = oct(x) #x is your decimal number
Comment

python integer to octal

print(str(1))  # convert number to string
print(int("1"))  # convert string to int
print(float(1))  # convert int to float
print(list('hello'))  # convert string to list
print(tuple('hello'))  # convert string to tuple
print(list((1, 2, 3)))  # convert tuple to list
print(tuple([1, 2, 3]))  # convert list to tuple
print(bool(1))  # convert a number to boolean
print(bool(0))  # convert a number to boolean
print(bool(""))  # convert a string to boolean
print(bool("data"))  # convert string to boolean
print(bin(10))  # convert an integer to a binary string
print(hex(10))  # convert an integer to a hex string
print(oct(10))  # convert an integer to an octal string
Comment

PREVIOUS NEXT
Code Example
Python :: how to convert float to string in python 
Python :: find index of sublist in list python 
Python :: check if all elements in list are equal 
Python :: how to read first column of csv intro a list python 
Python :: python obfuscator github 
Python :: python sliding window 
Python :: run all python files in a directory in windows 
Python :: remove word from string in python 
Python :: python staticmethod property 
Python :: optimize images using pillow 
Python :: python beautifulsoup get option tag value 
Python :: python print same line 
Python :: math module in python 
Python :: how to find uncommon records of two dataframes 
Python :: how to remove role discord bot python 
Python :: Kivy FileChooser 
Python :: how can I corect word spelling by use of nltk? 
Python :: python for enumerate 
Python :: matplotlib histogram frequency labels 
Python :: change markersize in legend matplotlib 
Python :: python to postgresql 
Python :: dict get value by index 
Python :: how to take space separated input in pyhon dicationary 
Python :: how to remove a list of numbers from a list in python 
Python :: python sys 
Python :: matplotlib: use colormaps for line plot colors 
Python :: find & replace in csv file 
Python :: how to print a newline in python 
Python :: Flatten List in Python Using NumPy flat 
Python :: django sessions for beginners 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =