5 odpowiedzi
+ 2
[SOLVED] Thank you for advise, Herr Rozwel . I also think so. Thanks all.
+ 1
I am not sure is it allowed to post external links there, so i can only advise you to copy your title and paste it in a browser. There are plenty of sites explaining this with examples.
I believe it will be better than my approach to explain it here.
+ 1
Maksat Ramazanov
# Hi! Here is a simple example that explain polymorphism in Python:
def add(a, b):
return a + b # ’+’ gives polymorph. behavior.
# Add integers.
print(f"{add(2, 5) = }") # 7
# Add strings.
print(f"{add('abc', 'def') = }") # abcdef
# Add lists.
print(f"{add([3, 4], [7, 9]) = }") # [3, 4, 7, 9]
https://code.sololearn.com/cBPpur2jKdmc/?ref=app
+ 1
Thank you. That's really helpful, Per Bratthammar . Now I understand it more clearly.
+ 1
Herr Rozwel people post external links all the time. I don't think it's an issue.