import json
from dataclasses import asdict, dataclass
@dataclass
class Stack:
languages : tuple[str, ...] = ("Python", "Bash", "HTML", "CSS")
misc : tuple[str, ...] = ("Docker", "Linux", "FastAPI")
ongoing : tuple[str, ...] = ("Django", "Java", "JavaScript")
def serialize(self):
return json.dumps(asdict(self), indent=4)
stack = Stack()
print(stack.serialize())
printf("Thank You Very Much. Stay Tuned With Us !!"
import json
from dataclasses import asdict, dataclass
@dataclass
class Stack:
languages : tuple[str, ...] = ("Python", "Bash", "HTML", "CSS")
misc : tuple[str, ...] = ("Docker", "Linux", "FastAPI")
ongoing : tuple[str, ...] = ("Django", "Java", "JavaScript")
def serialize(self):
return json.dumps(asdict(self), indent=4)
stack = Stack()
print(stack.serialize())
printf("Thank You Very Much. Stay Tuned With Us !!"