Skip to content

Netsed if else #101

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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