Python Forum
Extracting and printing data
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extracting and printing data
#1
I am a newbie here. I have written simple code for reading purposes. I wanted to how can print the value from the Base class itself

I have a Breed class for trial purposes. If I create an object then I can access an element in the below code. IS it possible to write directly from main and derived class
class Animals:
    def Dog_Animal(self):
        print("category-Dog")

class Dog_breed(Animals):
    def Breed(self):
        print("Bow-Bow")

class Dog_child(Dog_breed):
    def Breed(self):
        print("Bow-Bow-child")

d=Dog_child()
d.Breed()
d.Dog_Animal()

New=Dog_breed()
New.Breed()


test=Animals()
test.Dog_Animal()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Extracting data from bank statement PDFs (Accountant) a4avinash 4 5,703 Feb-27-2025, 01:53 PM
Last Post: griffinhenry
  Confused by the different ways of extracting data in DataFrame leea2024 1 698 Aug-17-2024, 01:34 PM
Last Post: deanhystad
  Extracting the correct data from a CSV file S2G 6 1,853 Jun-03-2024, 04:50 PM
Last Post: snippsat
  Extracting Data into Columns using pdfplumber arvin 17 17,121 Dec-17-2022, 11:59 AM
Last Post: arvin
  Extracting Data from tables DataExtrator 0 1,636 Nov-02-2021, 12:24 PM
Last Post: DataExtrator
  extracting data ajitnayak1987 1 2,112 Jul-29-2021, 06:13 AM
Last Post: bowlofred
  Extracting unique pairs from a data set based on another value rybina 2 3,052 Feb-12-2021, 08:36 AM
Last Post: rybina
Thumbs Down extracting data/strings from Word doc mikkelibsen 1 2,529 Feb-10-2021, 11:06 AM
Last Post: Larz60+
  Extracting data without showing dtype, name etc. tgottsc1 3 8,847 Jan-10-2021, 02:15 PM
Last Post: buran
  Extracting data from a website tgottsc1 2 2,955 Jan-09-2021, 08:14 PM
Last Post: tgottsc1

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020