in Python by
Q:
How to create a class in Python?

1 Answer

0 votes
by
In Python programming, the class is created using a class keyword. The syntax for creating a class is as follows:

class ClassName:

#code (statement-suite)

Example of creating a class in Python.

Output:

XYZ
Click here to read more about Python
Click here to read more about Insurance

Related questions

0 votes
asked May 24, 2020 in Python by SakshiSharma
0 votes
asked May 23, 2020 in Python by sharadyadav1986
+1 vote
asked Feb 14 in Python by SakshiSharma
0 votes
asked May 23, 2020 in Python by sharadyadav1986
+1 vote
asked Feb 14 in Python by SakshiSharma
...