Avoiding Hard-Coding Values in Python


Use variables or constants instead of hard-coding strings or numbers into your code.

Source Code

MAX_SIZE = 100
size = 20
if size < MAX_SIZE:
    print("Size is within the limit.")
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments