clearing it

    0

    0

    Mahendra Kumar

    ListbeginnerDSA

    Python program to remove an item from a list using clean function

    # take list
    my_list = ['C', 'Java', 'Python', 'HTML', 'Javascript']
    # printing original list
    print('List:', my_list)
    # removed all item from the list
    my_list.clear()
    # print list after all item deletion
    print('New list:', my_list)
    
    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.