0% found this document useful (0 votes)
3 views1 page

Python Class Example: Dataset Type

The document describes how to create a class called Dataset in Python. It includes an attribute 'type' assigned the value 'csv' and demonstrates creating an instance of the class. Finally, it shows how to print the 'type' attribute of the instance.

Uploaded by

Marko Cvejic
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python Class Example: Dataset Type

The document describes how to create a class called Dataset in Python. It includes an attribute 'type' assigned the value 'csv' and demonstrates creating an instance of the class. Finally, it shows how to print the 'type' attribute of the instance.

Uploaded by

Marko Cvejic
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Klase u pythonu

Create a class called Dataset.


Inside the class, create a type attribute. Assign the value "csv" to it.
Create an instance of the Dataset class, and assign it to the variable dataset.
Print the type attribute of the dataset instance.

class Dataset:
def __init__(self):
[Link] = "csv"

dataset = Dataset()
print ([Link])

You might also like