String to ASCII

    0

    0

    Mahendra Kumar

    pythonListbeginnerstrings

    program to covert String to ASCII in Python

    # take input
    string = input("Enter any string: ")
    # printing ascii value of each character
    for i in range(len(string)):
        print("The ASCII value of character %c = %d" %(string[i], ord(string[i])))
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.