Posts by Cauê Carvalho • 49 points
3 posts
-
1
votes1
answer61
viewsQ: How to iterate a list in Flask
I have this code in Flask (which uses the Jinja2) {%block content%} {% for i in posts %} {% set x = x + 1 -%} <p style="border: 1px solid black; padding: 5px 5px; border-radius: 5px;">{{ i[x]…
-
0
votes1
answer32
viewsQ: Can I convert the output of an object using get()?
How do I convert the output of an object when using the get() function? Since it always returns a value string. Here’s a code I’m writing: import tkinter as tk import Sistema_backend top = tk.Tk()…
-
2
votes1
answer160
viewsQ: How does operator overload work?
How this code works? class MyClass: def __init__(self, *args): self.Input = args def __add__(self, Other): Output = MyClass() Output.Input = self.Input + Other.Input return Output def __str__(self):…