Python ascii() FunctionPython Functions


The ascii() function returns a readable object(String, Tuple, List, etc).

Example

#!/usr/bin/python3
# -*- coding: UTF-8 -*-

print(ascii('ABC'))
print(ascii('DEF'))
print(ascii('HIJ'))

Output:

'ABC'
'DEF'
'HIJ'

Syntax

ascii(object)

Parameters

Name Description
object An object(like String, List, Tuple, Dictionary, etc).

Return Value

It returns a readable version of any object(String, Tuple, List, etc).

© 2021 Programtips.org, all rights reserved. Privacy Policy | Contact Us