What are the keywords for defining classes in python

王林
Release: 2020-06-12 14:43:13
Original
17776 people have browsed it

What are the keywords for defining classes in python

#The class keyword is used in python to define classes.

The naming rule for classes is that the first letter of each word must be capitalized.

The syntax format for defining a class:

class ClassName:
    <statement-1>
    .
    .
    .
    <statement-N>
Copy after login

What is a class?

A class is used to describe a collection of objects with the same properties and methods. It defines the properties and methods common to each object in the collection. Each object is an instance of a class. .

Recommended tutorial: python tutorial

The above is the detailed content of What are the keywords for defining classes in python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template