Skip to content

Netsed if else #101

@satyasahoo210

Description

@satyasahoo210

Traditional way

if a > 7:
    b = '>7'
elif a == 7:
    b = '7'
else:
    b = '<7'

hack

b = '>7' if a > 7 else '7' if a == 7 else '<7'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions