Похожие чаты

Let'S say, we wanna import a module called X, which

is a script called X.py

Inside X.py, we have:

class Test(object):
pass

class Test1(object):
pass

We only want to import Test1() from this script. The syntax for it in Python is: from X import Test1

And now we can use Test1(), just like that. But if we said: import X, we'd have to use Test1() like X.Test1()

from is literally just an English "from". Where are you getting Test1() from? From X.py

2 ответов

4 просмотра

😍😍😍😍 simple

Thanks a lot💐💐

Похожие вопросы

Обсуждают сегодня

Hey guys, did you see the new announcement about $Fun? 🔥
Filip Murphy
55
А чем вам питонисты не угодили?😂
.
79
So total 101m burned Today?
Simu
18
Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
75
всем доброго времени суток! имею вопрос: как понять ТОЧНО, что на нексус производится атака или он перегружен? исходные данные: - Nexus OSS 3.67.1-01 на OrientDB - Total co...
Michael Kostelcev
11
Hi, I can't understand promises in JavaScript and what we should use them for (maybe the teacher didn't teach well XD). Do you have a solution for this? And are promises used...
A
29
Ребят, а за скок можно впарить анон чат с апишкой и веб админкой ?
Eugene Неелов
15
People that were staking their LRC20 LGCY and then chose to partake in the swap back to erc, did they receive just the initial amount staked or did they also receive their sta...
Tiger Whitehead 🏴‍☠️
8
Since the new token has so many features, can I give you permission to just go ahead and stake them for me so I don’t have to do anything or ask Sig what I should do?
Coop
9
I'm already lost in the new tokenomics, so is it better or worse for us retail investors now? I try to estimate if this price is only short time dump or the new standard level...
Aρπακτική όρκα 🇨🇿🇬🇷
10
Карта сайта