#off-topic-lounge-text

1 messages · Page 27 of 1

potent notch
#

is this the path

#

that the packages are installed in

jovial ravine
#

you can google how to set environment variable in windows

#

front page results

potent notch
#

wait

#

so what does making an environment variable do

#

plus this thing happens

#

sometimes

#

even though i've installed tikinter before

jovial ravine
#

See the Python 3 docs for PYTHONPATH.

The PYTHONPATH variable has a value that is a string with a list of directories that Python should add to the sys.path directory list. - from the previous link

hasty basalt
#

@potent notch are you using powershell to install this?

#

like

#

the terminal

potent notch
#

no im using cmd

#

command prompt

hot tiger
#

try anconda

willow thorn
#

I need to send 50 message or the server will kill me

forest belfry
#

hi

primal bison
#

Hi! :wave:

magic trout
#

HI :)

obtuse quest
#

Hello!

#

i need help algoritme

fading shuttle
#

hello

royal temple
#
started = False
while True:
    command == input("> ").lower()
    if command == "start":
        if started:
            print("car is  already started...")
        else:
            started = True
            print("car started")
    elif command =="stop":
        if not started:
            print("car is already stopped...")
        else:
            started = False
            print("Car stopped!")
    elif command == "help":
        print("""
Start - starts the car
Stop - Stops the car
Quit - to end game""")
    elif command == "quit":
        break
    else:
        print("Please input proper command...")```
#
command = ""
started = False
while True:
    command == input("> ").lower()
    if command == "start":
        if started:
            print("car is  already started...")
        else:
            started = True
            print("car started")
    elif command =="stop":
        if not started:
            print("car is already stopped...")
        else:
            started = False
            print("Car stopped!")
    elif command == "help":
        print("""
Start - starts the car
Stop - Stops the car
Quit - to end game""")
    elif command == "quit":
        break
    else:
        print("Please input proper command...")```
wide aurora
#

@unique skiff hey! do you need help?

crisp mantle
#

Hello there, I have a quick newbie question, when I set VScode to use the python3 version 3.8.x without the virtual env it can find my modules just fine, like for example the module netmiko for network device automation and interaction, but if I switch the python3 version using the venv I have this error saying that it cannot import the module netmiko

#

I know this is something obvious but I am not familiar with python3 and virtual environments

#

Is this because I need to set some sort of path in the python3 venv ? that is already set in the system version?

#

I think I got the solution

#

I did a source blah blah venv name and activate, then while there, I installed the module netmiko

#

but I got this at the end:

  Building wheel for future (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/jair/Documents/PYTHON3/venv1/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iza1x_yz/future/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iza1x_yz/future/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-i3puof3d
       cwd: /tmp/pip-install-iza1x_yz/future/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for future
  Running setup.py clean for future
Failed to build future
Installing collected packages: pycparser, cffi, bcrypt, pynacl, cryptography, paramiko, scp, tenacity, pyserial, future, textfsm, ntc-templates, netmiko
    Running setup.py install for future ... done
Successfully installed bcrypt-3.2.0 cffi-1.14.4 cryptography-3.3.1 future-0.18.2 netmiko-3.3.2 ntc-templates-1.6.0 paramiko-2.7.2 pycparser-2.20 pynacl-1.4.0 pyserial-3.5 scp-0.13.3 tenacity-6.3.1 textfsm-1.1.0
#

I wonder if it's OK to ignore

primal bison
#

hey

faint sigil
#

laundmo it’s ok babe

primal bison
#

actually i just want to get some archived posts

#

like i want to scrape top comments on posts on r/RoastMe

cold cipher
static knot
#

Hi everyone

#

I am just trying to install python and VSCode to start learning python

#

and was wondering if anyone could help with the instruction of terminal

crisp mantle
cold cipher
#

if that doesn't work try pip install wheel

#

as in if it doesn't have the command

crisp mantle
#

It should be pip3 install ... as I am using python3 only in my OS

#

Let me give it a try

#

I was not even aware of this source venv1/bin/activate where the name of my first venv is = venv1

#

that was the first thing I needed to do, which change my terminal to this > (venv1) jair@x1:~/Documents/PYTHON3$ which then make sense as I need to install all the modules I use for python3 in the venv that I used to use in my system itself. Again, this is the first time for me to use venv, everyone in YouTube or python3 courses recommend it.

#

@cold cipher I got this message > Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (0.34.2)

cold cipher
#

OK, I wasn't sure if that was it

#

guess not

crisp mantle
#

@cold cipher perhaps it is some other deps...

cold cipher
#

Well

#

thing is

crisp mantle
#

Maybe setuptools

cold cipher
#

the missing command was bdist_wheel

#

ooh try it

#

bdist_wheel is installed with wheel

#

I thought

#

but I might be from setuptools

crisp mantle
#

ahh Ok

#

let me check

#

however, I got this message in the end of the output:

    Running setup.py install for future ... done
Successfully installed bcrypt-3.2.0 cffi-1.14.4 cryptography-3.3.1 future-0.18.2 netmiko-3.3.2 ntc-templates-1.6.0 paramiko-2.7.2 pycparser-2.20 pynacl-1.4.0 pyserial-3.5 scp-0.13.3 tenacity-6.3.1 textfsm-1.1.0```
#

That worked and in my venv1 the netmiko module works just fine

#

Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (45.2.0)

#

@cold cipher anyway I can try to reproduce that error?

#

If I try to install another module?

cold cipher
#

huh

#

strange

crisp mantle
#

or is there some sort of pip3 command I can use to check if there are any missing deps

cold cipher
#

If it doesn't autoinstall it then there is an issue in the module itself

#

They should all be in the install_requires=[...] statement in setup(...) in setup.py inside the module

crisp mantle
#

But you might be right, I do have python2 in the Linux system itself but I don't use it

#

I see in the errors that it is referring to pip-blah blah no pip3

#

I can try installing with just pip and see

#

what do you think?

#

@cold cipher this worked > ```(venv1) jair@x1:~/Documents/PYTHON3$ pip install wheel
Collecting wheel
Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.36.2

cold cipher
#

Yay!

crisp mantle
#

but again, how can I reproduce the error, perhaps if I install another module I might use in the future?

cold cipher
#

It shouldn't need wheel

#

I don't know why you got a source dist in the first place

#

not a compiled wheel

#

strange, that's for sure

crisp mantle
#

For example I tried to install this new module:

  Attempting uninstall: requests
    Found existing installation: requests 2.22.0
    Not uninstalling requests at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'requests'. No files were found to uninstall.
Successfully installed nornir-netbox-0.2.0 requests-2.25.1
#

but it looks like I am not getting that bunch of errors I was getting before

#

@cold cipher I think I am in good shaoe though, and I really appreciate your help on this

cold cipher
#

@crisp mantle Anytime ¯_(ツ)_/¯

solid flame
#

Yes it is lol

#

Thank you for noticing

primal bison
#

intersting

#

in the uk it is a deep specialisation

#

here we do one thing and its ur job to be well rounded

#

i feel like the us government is too encroaching with their policy

#

we do too

#

evertyone does

#

whoops wrong chat i should be in voice chat

#

my bad

#

sorry

green remnant
#

How can I haft as train and test file with sklearning ?

#

sckitlearn*

sleek frost
#

Anyone knows how to code a Discord bot that just stays 24/7 in a Speak Channel and doesn't quit even if I turn down my PC?

buoyant kestrel
#

You'd have to have it hosted on a VPS, Raspberry Pi or on a computer you don't plan on ever turning off

#

The bot can only run so long as whatever it's hosted on is on

primal bison
#

yo

proven crane
#

yo

candid lion
forest belfry
#

hi

#

why cant i join the voice channel

candid lion
#

Hey

solar leaf
#

Should I go for vscode or Visual Studio

#

for python development

solar leaf
carmine current
#

visual studio is by no means meant for python

solar leaf
#

@carmine current thank you so much.

fluid stream
#

i need help with lists

candid lion
#

Go ahed @fluid stream

fluid stream
#

Nvm it’s been sorted

warm hedge
#

need help @reef pulsar

#

?

reef pulsar
#

no, sorry

lost finch
#

Guys its telling I dont need permission to unmute

#

How can I get it??

shadow ivy
#

you need to get voice verified

#

there are requirements

#

the bot probably pinged you w/a link when you joined the vc no?

buoyant kestrel
cerulean hound
#

boetis

#

boetis

#

is mw

#

me

#

me

#

me

warm hedge
#

need help @primal bison ?

primal bison
#

a little

warm hedge
#

whats it about

primal bison
#

class method

strange thunder
#

How can I do a really basic Web Crawler?

thorny ermine
#

!code

buoyant kestrel
#

!voice

timid fjordBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

gaunt dragon
#

worldly stratus
#

wasssssssssssssssssssssssssssssup

knotty gorge
#

!voice

timid fjordBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

steep zinc
#

i might spam a little here lmao

broken talon
#

spamming is bad

raw sky
#

hey.I someone here?

#

is*

warped musk
#

yup

urban arrow
#

hey guys are yu really busy rn

#

can you unmute me for a sec

#

pls

fresh obsidian
#

I have one doubt in python

fresh obsidian
late heath
rugged briar
hazy forge
warped musk
#

hi

hazy forge
#

how u doing

warped musk
#

great

hazy forge
#

long time no see

#

cool

warped musk
little finch
#

hi

torn cargo
#

hi

#

hi

#

!voiceverify

#

!voiceverify

steep marsh
#

Peace exists only in VC 1

primal bison
#

lol

primal bison
#

!voiceverify

primal bison
#

!voiceverify

primal bison
#

def deleting(counter):

 counter += 1
 print(type(counter))
 cursor.execute("DELETE FROM words WHERE rowid = {}".format(counter))
 conn.commit()
#

it does not work! but why?

quasi widget
#

!voiceverify

#

!voiceverify

rotund flame
#

Hello all

earnest flame
#

!voiceverify

modest bear
#

!voiceverify

carmine current
wild basin
#

!resources

timid fjordBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

primal bison
#

@primal bison thinkmon

buoyant kestrel
#

!rule 5 @rocky peak

timid fjordBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, be considered malicious or inappropriate. Do not help with ongoing exams. Do not provide or request solutions for graded assignments, although general guidance is okay.

buoyant kestrel
#

We will not assist with DDOS things like that. Period.

rocky peak
#

?

#

e

#

que ?

buoyant kestrel
#

DDoS, the thing that was in your screenshot.

#

Not an acceptable topic for the server.

rocky peak
#

eso

#

era falso

#

era una broma para un server y todos comenzaron a decir que estaba haciendo un viruz y en realidad estaba praticando python

#

y comenze a buscar vainas de ddos

buoyant kestrel
#

English only on the server

#

!rule 4

timid fjordBOT
#

4. This is an English-speaking server, so please speak English to the best of your ability.

buoyant kestrel
#

@rocky peak

rocky peak
#

ok thanks i'm wrong i was server and i will explain

buoyant kestrel
#

Fine, just be more careful next time. @rocky peak

#

Jokes like that are taken incredibly seriously

rocky peak
#

sorry

solid belfry
#

nice

rocky peak
#

Help

waxen garden
#

i have an np array t = [3,2,4,2,4,NaN,NaN] and i have an array tisNaN = [False,False,False,False,False,True,True] (from np.isnan(t) and i want to delete the nan values out of t
how do i do it?

waxen garden
#

i found a solution

soft hamlet
#

I am running python on a pi 4 and when i am testing some code in visual studio code and when i try to use random it is not working can anyone help

primal bison
#

Hiii

#

Engliş bilmiyore

#

Plesae voice open the door

ripe fractal
peak latch
#

@ebon cargo

#

@ebon cargo skoc do VC

#

@ebon cargo kamo wtf ja nemuzu zapnout mikrofon lol

ebon cargo
#

@peak latch je to potlačený

peak latch
#

@ebon cargo cekej, hledam novy server s VC

primal bison
#

If you are trying to partner on a GUI Project hmu

primal bison
bright sun
#

hello everyone, I would like to know if someone did any research or project?

primal bison
#

expected identifier or '('

plush stirrup
#

for(int i = 0; i <= 20; i++)
{
int[] numbers = new int[1, 2, 3, 4, 8];
int MyIndex = Random.Range(0, 4);
randomKodiya = numbers[MyIndex];
}

#

halp

#

no mic

#

sorry

thin briar
#

wait

#

stop

#

we can talk

#

@wide aurora

#

we can talk

#

fuck

#

i just wanna

#

learn some python

#

why it no print

#

my hangman

primal bison
#

hey bro

#

sorry my mic is not yet authorised

#

you need help?

#

imma try to quickly see if my voice is now verified

#

how am i still not verified tf

#

okay chief i really dont understand

#

queamer u need help?

dim geyser
#

my mic isn't authorized yet either

eager hare
#

can someone help
with installing opencv on anaconda

arctic hatch
#

command(pass_context=True)
async def pm(ctx, user: discord.User):
embed = discord.Embed(title="send", color=0x006eff)
await ctx.send(embed=embed)
for i in range(spam):
if stop != 0:
await user.send(f'{user.mention}' + " GAY!? AND DOSH")
else:
break

#

command()
async def stop(ctx):
stop = 0
print("STOP")

rustic forge
#
while(stop):
   pass
tender tangle
#

!code

timid fjordBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

arctic hatch
severe flame
#

GAY? AND DOSH :D

arctic hatch
rustic forge
#

@tender tangle

#

ty man

tender tangle
#

lol

primal bison
#

game_is_on = True
apple = Actor("apple")
score = 0
def draw():
    screen.clear()
    apple.draw()

def place_apple():
    apple.x = randint(10, 800)
    apple.y = randint(10, 600)
    
place_apple()


def on_mouse_down(pos):
    global score
    global game_is_on
    while game_is_on == True :
        if apple.collidepoint(pos):
            print("Good Shot!")
            score = score +1
            print(score)
            place_apple()
            game_is_on = True

        else:
            print("You missed!")
            ans = input("Do you want to play again? \"Yes\" or \"No\"?")
            print(ans)
            if (ans == "Yes"):
                game_is_on = True
            else:
                quit()```
rustic forge
#

@buoyant kestrel wheres the while

#

i cant find it 🤣

cedar matrix
rustic forge
#

או וואו
ממש עזרת חביבי

cedar matrix
rustic forge
#

oh thanks

buoyant kestrel
rustic forge
#

im osrry it was so demanding itttt

#

listen we are like

#

we need a role

#

for israeli

primal bison
#

technoblade ur MIC IS MUTED

hazy forge
#

guys why is spotify developer site all messed up

#

i dont know if others see the same thing

#

someone pls help

light stone
#

Spotify is blocked in my country thus dont have an account. There may be some variations due to it

primal bison
#

w,p,c6+w,q,c8+w,p,g7+w,k,e5+b,b,b2+b,p,f3+b,k,f1

"b" = Black
"w" = White

Rank

"q" = Queen
"k" = King
"b" = Bishop
"r" = Rook
"n" = Knight
"p" = Pawn
#

def move(letterx):

#

def move (abc):

#

a: piece

#

b: letter

#

c: number

#

map:
a: 1
b: 2
c: 3
d: 4
e: 5
f: 6
g: 7
h: 8

#

array[b][c] = a

#

!dict

timid fjordBOT
#
Did you mean ...

iterate-dict
dictcomps
dict-get

primal bison
#

You learning python?

#

Oh Nice

#

Uni student?

#

I'm just a school student

#

I finished 11 year

#

12 year

#

I'm also a beginner in python.

drifting spruce
#

!server

timid fjordBOT
#
Server Information

Created: 4 years, 1 month and 11 days ago
Voice region: europe
Roles: 82
Member status: status_online 44833 status_offline 105809

Members: 150641

Helpers: 90
Moderators: 28
Admins: 13
Owners: 3
Contributors: 37

Channels: 206

Category: 25
News: 8
Staff: 56
Text: 108
Voice: 9

drifting spruce
#

@wide aurora

dim sundial
#

So now filling around with having my code skip three randomly chosen number. I found the next function, does it have to be defined before the range? here the code phy def sleepingRange(): firstNumber = random.randint (1, 10) secondNumber = random.randint (1, 10) thirdNumber = random.randint (1, 10) for number in range(12): print(number) for _ in range(6): time.sleep(0.5) print("z") if number == (firstNumber, secondNumber, thirdNumber): next (number) phy

toxic robin
#

Hey! I have a Q: In windows I could press alt + 122 or any number and it would give the ascii char. How can i do it in Linux? Ubuntu

dim sundial
#

range_iterator object at 0x00000264CD213C70>

worn gulch
#

The initial answer yielded the same thing I initially said to myself: it's an iterable, not an interator. But then, that wouldn't explain why this works, if both are simply generators:

x = (i for i in range(30))

next(x)
0

dim sundial
#

If anyone knows how to tell to skip numbers in a list while keeping my code, sort of stuck

#

my code phy def sleepingRange(): firstNumber = random.randint (1, 10) secondNumber = random.randint (1, 10) thirdNumber = random.randint (1, 10) for number in range(12): print(number) for _ in range(6): time.sleep(0.5) print("z") if number in (firstNumber, secondNumber, thirdNumber): not (firstNumber, secondNumber, thirdNumber) phy

#

hello yousself

#
  firstNumber = random.randint (1, 10)
  secondNumber = random.randint (1, 10)
  thirdNumber = random.randint (1, 10)
  for number in range(12):
    print(number)
    for _ in range(6):
      time.sleep(0.5)
      print("z")
    if number != firstNumber:
      print (number)
      if number != secondNumber:
        print (number)
        if number != thirdNumber:
          print (number) ```
#

Define a function which will take three int arguments, all of which will be greater than 0 and less than 11 (you do not need to test for this here). The purpose of the function is to display a count from 1 to 10 with a three second pause between each count with a “Z” being displayed on the screen every ½ a second. However the count will skip the three numbers passed into the function.

celest fable
#

def sleepingRange(first, second, third):

dim sundial
ember burrow
#

!!paste

timid fjordBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

cedar jetty
#

wow

primal bison
true narwhal
#

Hi guys

#

Someone can help me solve a problem folks?

#

i'm struggle with one problem in python, if someone have time please

#

trying to rank a dictionary, with teams

#

[{'team': 'América Mineiro', 'total_of_points: 0, 'games_played': 0, 'goals': 0, 'goals_pro': 0}, {'team': 'Avaí', 'total_of_points': 0, 'games_played': 0, 'goals': 0, 'goals_pro': 0}, {'team': 'Botafogo-SP', 'total_of_points': 0, 'games_played': 0, 'goals': 0, 'goals_pro': 0}]

#

something like this, how i cant get the more higher scores

#

in "total_of_points"?

#

i make a several things unsuccessfully

jagged basin
#

hey guys I got a question

#

so im trying to take an image and basically mask and filter it to only take in white

#

using opencv

#

then take pytess to turn it from image to text

#

its having trouble with differentiating w's y's and sometimes numbers too

#

I wanna know how I can refine the image to make it easier to read

#

the white text bleeds into red adn black so idk how im supposed to get it to work exactly

candid lion
#

!server

timid fjordBOT
#
Server Information

Created: 4 years, 1 month and 12 days ago
Voice region: europe
Roles: 82
Member status: status_online 29734 status_offline 121551

Members: 151284

Helpers: 90
Moderators: 27
Admins: 13
Owners: 3
Contributors: 37

Channels: 204

Category: 25
News: 8
Staff: 54
Text: 108
Voice: 9

frank patio
#

2

timid fjordBOT
#

:incoming_envelope: :ok_hand: applied mute to @frank patio until 2021-02-21 21:43 (9 minutes and 59 seconds) (reason: burst rule: sent 8 messages in 10s).

hazy forge
#

how do i get into vc

static vine
#

Need help I got cash I wanna like watch and take it like a learnin andand grow.

#

No I wanna learn how to code python

timid fjordBOT
#

@primal bison Please don't try to ping @everyone or @here. Your message has been removed. If you believe this was a mistake, please let staff know!

primal bison
#

like 5 sec searching

#

https://www.youtube.com/watch?v=rfscVS0vtbw dude here did a 4hour video

This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a python programmer in no time!

⭐️ Contents ⭐
⌨️ (0:00) Introduction
⌨️ (1:45) Installing Python & PyCharm
⌨️ (6:40) Setup & Hello World
⌨️ (10:23) Drawing a Shape
⌨️ (15:06) Variables & Data Types
⌨️ (27:03) Working...

▶ Play video
primal bison
warm root
#

Byte of python is the best free discord book.

magic gulch
#

Can anyone help me with some HW?

rustic dirge
#

hi

frail quarry
#

anyone know any aerodynamics panel method programming?

dim summit
#

i need some good Text Editors, (not pycharm it wont download for some reason)

dim summit
#

alr

hidden acorn
#

Hi

final flower
#

hello

#

i want help

#

can anyone help me

#

thank you

#

sorry

primal bison
#

with what ?

primal bison
#

if someone wants to look at that .. an example is at the bottom

primal bison
#
import onyx

while True :
  text = input("ONYX > ")
  result, error = onyx.run('<stdin>', text)

  if error:
    print(error.as_string())
  else:
    print(result)
primal bison
#

ok

#

do you want to join a call?

#

so I can talk

scenic pine
#

<@&267629731250176001>

ocean sleet
#

@scenic pine Is there anything you need moderated?

scenic pine
#

No I was asking some questions about the server

#

but I should have done mod mail

#

I am so sorry

ocean sleet
#

Right, please refrain from pinging the entire moderation team next time, @subtle palm works fine for this

scenic pine
#

👍

young glade
ocean sleet
wide moon
#

Hello

#

Guys

#

how are u?

#

Where channel for russian?

#

or ur dont have this voice and channel?

heady dagger
#

i badly need your help

#

is any body there

mystic shuttle
#

help plz

earnest fractal
#

@heady dagger you still need help?

#

@mystic shuttle you still need help?

wintry sorrel
#

if someone can answer, this.

#

what does the break statement do ?

#

for instance

#

If:
something
break
else:
something

#

what does the break do here

#

wht does the break do here

wide aurora
#

!docs break

timid fjordBOT
#
b(reak) [([filename:]lineno | function) [, condition]]```
With a *lineno* argument, set a break there in the current file. With a *function* argument, set a break at the first executable statement within that function. The line number may be prefixed with a filename and a colon, to specify a breakpoint in another file (probably one that hasn’t been loaded yet). The file is searched on [`sys.path`](sys.html#sys.path "sys.path"). Note that each breakpoint is assigned a number to which all the other breakpoint commands refer.

If a second argument is present, it is an expression which must evaluate to true before the breakpoint is honored.

Without argument, list all breaks, including for each breakpoint, the number of times that breakpoint has been hit, the current ignore count, and the associated condition if any.
wide aurora
#

!break

vernal snow
#

inconsistent fucking spaces if num!= 6 what the fuck

#

!e

x = [1,2,3]
for i in x:
    print(i)
    if i == 2:
        break
timid fjordBOT
#

@vernal snow :white_check_mark: Your eval job has completed with return code 0.

001 | 1
002 | 2
manic oak
#

!e

timid fjordBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*

#

@manic oak :x: Your eval job has completed with return code 1.

001 | Guess the number between 1-10: Traceback (most recent call last):
002 |   File "<string>", line 16, in <module>
003 |   File "<string>", line 7, in GameNumber
004 | EOFError: EOF when reading a line
shrewd bear
#

!voice

timid fjordBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

cosmic elk
#

im trying to figure out a way to make a list of certain tuples in a dictionary after doing a loop on the dictionary, can I talk to someone so I can explain my problem a little better?

wide aurora
#

!e

my_dict = {
  "a": ("a", "b", "c")
}

values_of_a = my_dict["a"]
print(values_of_a)
list_of_a = list(values_of_a)
print(list_of_a)
timid fjordBOT
#

@wide aurora :white_check_mark: Your eval job has completed with return code 0.

001 | ('a', 'b', 'c')
002 | ['a', 'b', 'c']
primal bison
#

@wide aurora Do you need any help?

wide aurora
#

!e

product_values = {
  "shampoo": 5,
  "orange": 0.99,
  "apple": 1.25
}

print("shampoo costs: ", product_values["shampoo"])
print("orange costs: ", product_values["orange"])
print("apple costs: ", product_values["apple"])
timid fjordBOT
#

@wide aurora :white_check_mark: Your eval job has completed with return code 0.

001 | shampoo costs:  5
002 | orange costs:  0.99
003 | apple costs:  1.25
cosmic elk
#

aDict = dict(zip(productList, priceList))

wide aurora
#

!docs dict

timid fjordBOT
#
class dict(**kwarg)``````py
class dict(mapping, **kwarg)``````py
class dict(iterable, **kwarg)```
Return a new dictionary initialized from an optional positional argument and a possibly empty set of keyword arguments.

Dictionaries can be created by several means:

• Use a comma-separated list of `key: value` pairs within braces: `{'jack': 4098, 'sjoerd': 4127}` or `{4098: 'jack', 4127: 'sjoerd'}`

• Use a dict comprehension: `{}`, `{x: x ** 2 for x in range(10)}`

• Use the type constructor: `dict()`, `dict([('foo', 100), ('bar', 200)])`, `dict(foo=100, bar=200)`
... [read more](https://docs.python.org/3/library/stdtypes.html#dict)
primal bison
#

Yes

wide aurora
#

!e

product_costs = {
  "Apple": 0.25,
  "Orange": 1.05,
  "Shampoo": 3,
}
products_bought = []
money_spent = 0


for item in ["Apple", "Orange", "Orange", "Apple", "Shampoo"]:
  cost = product_costs[item]
  products_bought.append((item, cost))
  money_spent += cost

print(f"Money Spent: ${money_spent:.2f}")
print(f"Items bought: {products_bought}")
timid fjordBOT
#

@wide aurora :white_check_mark: Your eval job has completed with return code 0.

001 | Money Spent: $5.60
002 | Items bought: [('Apple', 0.25), ('Orange', 1.05), ('Orange', 1.05), ('Apple', 0.25), ('Shampoo', 3)]
cosmic elk
#
def groceryShopping(groceryList, priceList, budget):
    groceryBought = []
    aDict = dict(zip(groceryList, priceList))
    for key in aDict:
        while budget > 0:
            budget -= aDict[key]
            groceryBought.append((key, aDict[key]))
    return groceryBought

groceryList = ["apple", "eggs", "doughnuts", "bread", "milk", "coffee"]
priceList = [2.50, 6.00, 3.75, 2.00, 3.40, 12.99]
budget = 13.50
print(groceryShopping(groceryList, priceList, budget))
#

!e

def groceryShopping(groceryList, priceList, budget):
    groceryBought = []
    aDict = dict(zip(groceryList, priceList))
    for key in aDict:
        while budget > 0:
            budget -= aDict[key]
            groceryBought.append((key, aDict[key]))
    return groceryBought

groceryList = ["apple", "eggs", "doughnuts", "bread", "milk", "coffee"]
priceList = [2.50, 6.00, 3.75, 2.00, 3.40, 12.99]
budget = 13.50
print(groceryShopping(groceryList, priceList, budget))
timid fjordBOT
#

@cosmic elk :white_check_mark: Your eval job has completed with return code 0.

[('apple', 2.5), ('apple', 2.5), ('apple', 2.5), ('apple', 2.5), ('apple', 2.5), ('apple', 2.5)]
#

@wide aurora :white_check_mark: Your eval job has completed with return code 0.

001 | Apple
002 | Orange
003 | Shampoo
wide aurora
#

!e

def groceryShopping(groceryList, priceList, budget):
    groceryBought = []
    aDict = dict(zip(groceryList, priceList))
    while budget - min(aDict.values()) > 0:
      for key in aDict:
        cost = aDict[key]
        if budget - cost < 0:
          continue # Not enought money to continue
        else:
          budget -= cost
          groceryBought.append((key, aDict[key]))
      
    return groceryBought

groceryList = ["apple", "eggs", "doughnuts", "bread", "milk", "coffee"]
priceList = [2.50, 6.00, 3.75, 2.00, 3.40, 12.99]
budget = 30
items_bought = groceryShopping(groceryList, priceList, budget)
print(items_bought)
print(sum(i[1] for i in items_bought))
timid fjordBOT
#

@wide aurora :white_check_mark: Your eval job has completed with return code 0.

001 | [('apple', 2.5), ('eggs', 6.0), ('doughnuts', 3.75), ('bread', 2.0), ('milk', 3.4), ('apple', 2.5), ('eggs', 6.0), ('doughnuts', 3.75)]
002 | 29.9
#

@wide aurora :white_check_mark: Your eval job has completed with return code 0.

001 | [('apple', 2.5), ('eggs', 6.0), ('doughnuts', 3.75)]
002 | 12.25
wide aurora
#

!e

def groceryShopping(groceryList, priceList, budget):
    i = 1
    while sum(priceList[:i+1]) < budget:
        i += 1

    return [(groceryList[num], priceList[num]) for num in range(i)]


groceryList = ["apple", "eggs", "doughnuts", "bread", "milk", "coffee"]
priceList = [2.50, 6.00, 3.75, 2.00, 3.40, 12.99]
budget = 13.50
items_bought = groceryShopping(groceryList, priceList, budget)
print(items_bought)
print(sum(i[1] for i in items_bought))
timid fjordBOT
#

@wide aurora :white_check_mark: Your eval job has completed with return code 0.

001 | [('apple', 2.5), ('eggs', 6.0), ('doughnuts', 3.75)]
002 | 12.25
wide aurora
#

!e

my_tuple = (34634,1235,1321,345,123,346543,1232354,ord("a"))
print(f"Max Values: {max(my_tuple)}")
print(f"Min Values: {min(my_tuple)}")
timid fjordBOT
#

@wide aurora :white_check_mark: Your eval job has completed with return code 0.

001 | Max Values: 1232354
002 | Min Values: 97
wide aurora
#

!doc ord

timid fjordBOT
#
ord(c)```
Given a string representing one Unicode character, return an integer representing the Unicode code point of that character. For example, `ord('a')` returns the integer `97` and `ord('€')` (Euro sign) returns `8364`. This is the inverse of [`chr()`](#chr "chr").
primal bison
#

I need help to complete my program

#

def moyenne(nom):
if nom in Durand:
notes = resultats[nom]
total_points = {'Durant':[0]}
print(total_points)
total_coefficients = {'Durant':[1]}
for i in notes.values():
note, coefficient = valeurs
total_points = total_points + 2 *coefficient
total_coefficients = 2 +coefficient
return round(total_points/total_coefficeints ,1)
else:
return -1

resultats = {'Dupont':{'DS1':[15.5,4],'DM1':[14.5,1],'DS2':[13,4],'PROJET1':[16,3],'DS3':[14,4]}}, {'Durand':{'DS1':[6,4],'DM1':[14.5,1],'DS2':[8,4],'PROJET1':[9,3],'DS3':[8,4],'IE1':[7,2],'DS4':[15,4]}}

timid fjordBOT
#

Hey @static slate!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

• If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

• If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

agile fjord
#

👁️

warm hedge
#

need help @primal bison ?

cosmic elk
#

can i get some help regarding the calendar module in a vc?

fervent spire
#

!slut

#

!rank

timid fjordBOT
#

Iterating over range(len(...)) is a common approach to accessing each item in an ordered collection.

for i in range(len(my_list)):
    do_something(my_list[i])

The pythonic syntax is much simpler, and is guaranteed to produce elements in the same order:

for item in my_list:
    do_something(item)

Python has other solutions for cases when the index itself might be needed. To get the element at the same index from two or more lists, use zip. To get both the index and the element at that index, use enumerate.

buoyant kestrel
#

!warn 757562838834479124 Not entirely sure why you thought trying to do a !slut command was appropriate, but I'm here to tell you that it isn't.

timid fjordBOT
#

:incoming_envelope: :ok_hand: applied warning to @fervent spire.

deep beacon
#

oh shi-

#

thats a lotta code

#

_>

buoyant kestrel
deep beacon
#

we all have 24 hrs in a day tho

#

lol

#

thats a lotta code >_>

toxic marsh
#

@hasty cedar you know i know little bit of python

#

because i mostly prefer c++

hasty cedar
#
num = [0 , 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6]
num1 = []
for i in num:  
    if i != 0: 
        num1.append(i)
for i in num1:
    print(i, end=' ')
toxic marsh
#

101

#

num = map(str,num1)

#

ans = [ele.lstrip('0') for ele in test_list]

#

!e```python

num = ['0' , '0', '0', '0', '0', '0', '1', '2', '3', '4', '5', '6']

num1 = [0 , 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6]

num = map(str,num1)

# Python3 code to demonstrate 

Remove leading 0 from Strings List

using lstrip() + list comprehension

# Initializing list

test_list = ['012', '03', '044', '09']

printing original list

print("The original list is : " + str(num1))

Remove leading 0 from Strings List

using lstrip() + list comprehension

res = [ele.lstrip('0') for ele in num]

printing result

print ("The string list after leading 0 removal : " + str(res))

warm hedge
#
num = [0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 0, 0]
p = True
new_num = []

for i in range(len(num)-1):
    if num[i] == 0 and num[i+1] != 0:
        p = False
    if not p:
        new_num.append(num[i+1])

print(new_num)```
broken talon
#

@warm hedge 👋

#

!d itertools.dropwhile

timid fjordBOT
#
itertools.dropwhile(predicate, iterable)```
Make an iterator that drops elements from the iterable as long as the predicate is true; afterwards, returns every element. Note, the iterator does not produce *any* output until the predicate first becomes false, so it may have a lengthy start-up time. Roughly equivalent to:

```py
def dropwhile(predicate, iterable):
    # dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1
    iterable = iter(iterable)
    for x in iterable:
        if not predicate(x):
            yield x
            break
    for x in iterable:
        yield x
warm hedge
bold jacinth
#

!code

shy tide
#
def dropwhile(predicate, iterable):
    # dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1
    iterable = iter(iterable)
    for x in iterable:
        if not predicate(x):
            yield x
            break
    for x in iterable:
        yield x
#

looool

fervent spire
#

@buoyant kestrel is sheet

primal bison
#

can i get a unmute

random wraith
#

hello

mint magnet
#

hello

brisk crest
#

!e

timid fjordBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*

brisk crest
#

!eval print("hello")

#

!eval print("hello")
num1 = 0
while "True"
num1 +1

timid fjordBOT
#

@brisk crest :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 3
002 |     while "True"
003 |                 ^
004 | SyntaxError: invalid syntax
primal bison
#

Help please

#

Anyone

primal bison
#

Is there a known way to get answers in google forms?

red leaf
#

as in scrape the responses?

#

ik you could set it up so you have a sheet with the responses

#

and then use the Google API to grab it

meager falcon
#

@snow moss u use mint ?? lemon_unamused

snow moss
#

ya

meager falcon
#

bruh, why light mode

snow moss
#

what light mode

meager falcon
#

@snow moss what are you doing with your life lol

#

why the mouse is so big

#

why light mode

snow moss
meager falcon
#

why mint

#

nvm

snow moss
#

I don't have an editor for C

cunning surge
#

Mint is nice

meager falcon
#

you use C?

cunning surge
#

Me?

meager falcon
#

C is awesome

snow moss
#

I needed a lightweight OS

cunning surge
#

Debian bro

meager falcon
#

u mean, mint is more lightweight than arch?

#

hah

snow moss
#

I don't use arch btw

meager falcon
#

anyway, what's up with C

#

iusearchbtw

snow moss
#

I don't understand C

#

and that makes me sad inside

#

I don't like to feel sad

meager falcon
#

me neither

cunning surge
#

Have you used i3 window manager yet?

meager falcon
#

jk

#

lol

meager falcon
cunning surge
#

banger

#

absolute

meager falcon
#

I was changing it's configuration parser

#

it was written in C

#

I was interested in the way they did that

#

actually they used another lib for that

#

other than writing it their own

cunning surge
#

Same

meager falcon
#

same?

#

wdym

#

@tulip grail yo o/

#

what is up

#

what the fuck lmao

#

@snow moss share ur thing again, i was enjoying blaming u lmao

#

jk

tulip grail
#

I am stuck in linked list hell

cunning surge
#

You messed with discrete binary searches yet?

meager falcon
#

what lang

#

py?

cunning surge
#

How are you stuck?

#

Ye, py

meager falcon
#

wait, how do you know

cunning surge
#

How do I know binary search trees?

meager falcon
#

@snow moss but i feel stronger if u share ur screen lel

tulip grail
#

I’ve done adding stuff before the head, after the tail, between nodes

meager falcon
#

idk, it's just good

tulip grail
#

haven’t gotten up to deleting yet

#

Why are we whispering again?

cunning surge
#

Because someone is sleeping

tulip grail
#

oh

cunning surge
#

yeah

meager falcon
#

yeah

tulip grail
#

Anyways I’m gonna go to bed soon

cunning surge
#

same

meager falcon
#

wtii

#

(what time is it)

tulip grail
#

11:41

cunning surge
#

10:41

#

wanna play rock, paper, scissors?

meager falcon
#

pm?

cunning surge
#

sure

tulip grail
#

Yep PM

meager falcon
#

yea

cunning surge
#

Have you used CentOS 8 yet?

meager falcon
#

just tested it live

#

but i used fedora

#

it was very cool

rancid pumice
#
class Defaults(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @commands.Cog.listener()
    async def on_member_join(self, member):
        print(member)


class BotSkeleton:
    def __init__(self, prefix, token):
        self.prefix = prefix
        self.token = token

        self.bot = commands.Bot(command_prefix=self.prefix)
        self.bot.remove_command("help")

        self.bot.add_cog(Defaults(self))

buoyant kestrel
pearl oriole
#

hello friends

#

i would like to aquire some assistance

primal bison
severe flame
#

Saved my files
Time for a clean boot

#

Manjaro is better than Ubuntu.

upbeat peak
#

How do I go about fixing this?```
print(datetime.fromtimestamp(int(1615228750203)))
OSError: [Errno 22] Invalid argument

sturdy geyser
#
    player.last_login = player_data['player']['lastLogin']
    player.last_login = datetime.datetime.fromtimestamp(int(player.last_login) // 1000).strftime('%Y-%m-%d %I:%M %p')
#
class Player:
    def __init__(self):
        self.uuid = ''
        self.name = ''
        self.rank = ''
        self.karma = ''
        self.first_login = ''
        self.last_login = ''
        self.networkLevel = ''
inland blaze
#

I was building a chess game with pygame

#

But i am having a lot of trouble

#

what do i do?

sturdy geyser
#

Make sure you understand each bit of code you write, and if you don't understand your code then I would recommend to just refresh your memory.

primal bison
#

Hi, I need some help to initiate my code if someone is there

#

so I've made a voice assistant and to initiate the code of that voice assistant I always have to open my pycharm. So is there any way in which the code can run in the background without opening pycharm.

night lily
#

@mighty storm

mighty storm
mighty storm
cold lintel
#

Alright

sturdy geyser
#
@dataclass
class OverallStatsAPI:
    """Dataclass for organizing API requests"""
    uuid:
    name:
    rank:
    karma:
    first_login:
    last_logout:
    networkLevel:

    def __init__(self, username, uuid: int, name:, rank:, karma:, first_login:, last_logout:, networkLevel):
        self.uuid =
        self.name =
cold lintel
#

Ohh right. You don't need an __init__ unless you want to customise it.

#

!eval ```py
from dataclasses import dataclass

@dataclass
class Foo:
a: int
b: str

foo = Foo(42, 'hello world')

print(foo)

timid fjordBOT
#

@cold lintel :white_check_mark: Your eval job has completed with return code 0.

Foo(a=42, b='hello world')
cold lintel
#

You can give default values by just assigning values to the field of the dataclass.

#

Not sure what you're asking sorry

sturdy geyser
#
def(self, username, uuid:, name:, rank:, karma:, first_login:, last_logout: networkLevel:):
        data = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{username}")
        uuid = data.json()
        player.uuid = uuid["id"]
cold lintel
#

Yeah, you need to specify the type of each of the fields of a dataclass.

#

I mean, kind-of

#

Python won't complain if you don't 😄

sturdy geyser
#
    uuid: int   
    name: str
    rank: str
    karma: int
    first_login: str
    last_logout: str
    networkLevel: str
cold lintel
#

However, I would recommend adding an alternative constructor, rather than overwriting __init__

#

Like, for example: ```py
@dataclass
class Square:
side_len: float

@classmethod
def from_area(cls, area: float):
    return cls(side_len=math.sqrt(area))
#

Then you would do ```py
square = Square.from_area(4)

#

Writing your own __init__ sort of defeats the point of using dataclass

#

😄

#

That's an argument passed into the function Square.from_area

#

The idea in this case is we want a way to construct a square from the area.

#

So, in your case, what does the dataclass represent?

sturdy geyser
#
@classmethod
    def APICalls(cls, uuid, name, rank, karma, first_login, last_logout, networkLevel):
cold lintel
#

Oh right, so the fields of the dataclass represent the values returned by a request to an API?

#

Sorry, I'm a bit slow today 😄

sturdy geyser
#

hold on

#

sorry lol

cold lintel
#

Right, so you want a method that carries out the request and constructs an instance from the returned data...

sturdy geyser
#

Ok

#

Sorry

cold lintel
#

Alright 😄

#

Have you got an example username, btw?

sturdy geyser
#

Slushs

cold lintel
#

Alright, can I try that out?

#

Alright

#

Hufflez, you there?

sturdy geyser
#
  @classmethod
    def APICalls(cls, uuid: int, name: rank, karma, first_login, last_logout, networkLevel):
cold lintel
#

So, what does this do?

#

Given X, you get back Y. What are X and Y?

#

Alright

#

@buoyant kestrel can Jake have screen share permissions?

#

Pinged him too 😄

#

So, given a username, you want to download all the info for that user from the API and put it in an instance of this dataclass?

#

Riight

#

So, usage would be something like OverallStatsAPI.from_username('slushs')?

#

Right, so this is for a command for a discord bot?

#

And the argument to the command is the username?

#
@dataclass
class OverallStatsAPI:
    """Dataclass for organizing API requests"""
    uuid: int   
    name: str
    rank: str
    karma: int
    first_login: str
    last_logout: str
    networkLevel: str

    @classmethod
    def from_username(cls, username: str):
        ...
        return OverallStatsAPI(
            uuid = uuid,
            name = ...,
            ...
        )
#

Yeah, well I'm assuming the plan is to use the first API to get the UUID from the username, then use the second API to get the data, and use that data to populate the dataclass instance?

#

Can you paste the original function here?

#

Oh, I mean the function you were talking about.

#

Dataclass function 😄

#

Nvm

#

Wait, Jake, I think you're confused about this. See the change I just made to the code above.

#

That should provide a template to fill in.

#

The data you want to put in the object 😄

primal bison
#

funny jake

cold lintel
#

You won't need the type annotations in the call to the constructor.

#

They're just keyword arguments, so it's = rather than :

#

Missing commas and values

#

that's why PyCharm is complaining.

#

I use Vim lemon_smug

#

Yeah, it takes a while to get used to the shortcuts.

#

Yep

#

Yeah, well, you're going to do some processing on the data, right?

#

So that all needs to come before you actually construct the dataclass instance.

#

No no, I mean, inside that method.

#
@dataclass
class OverallStatsAPI:
    """Dataclass for organizing API requests"""
    uuid: int   
    name: str
    rank: str
    karma: int
    first_login: str
    last_logout: str
    networkLevel: str

    @classmethod
    def from_username(cls, username: str):
        # Use first API to get UUID from username.
        # Download data from second API using UUID.
        # Extract the information you want from the raw data downloaded from the second API.
        # Construct the instance of the dataclass and return it:
        return OverallStatsAPI(
            uuid = uuid,
            name = ...,
            ...
        )
#

Go with a light theme 😄

#

Ouch

#

Yeah that's pretty bad, I take it back

hybrid vortex
#

Why am I muted?

buoyant kestrel
#

!voice

timid fjordBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

hybrid vortex
#

Ok thank you!

buoyant kestrel
#

Any time

#

Also sorry, I try not to just drop links. Always feels like it's rude when I do that

sturdy geyser
#

Your good!

hybrid vortex
#

Why do you have a classmethod in a classmethod?

cold lintel
#

Ah, that's a dataclass

hybrid vortex
#

Was talking to @sturdy geyser

cold lintel
#

Jake, yes you could do uuid = data.json()['id']

hybrid vortex
#

What's the issue here @sturdy geyser?

#

Are we just hanging out or?

cold lintel
#

Tenth time lucky 😄

cold lintel
#

And getting to grips with dataclasses.

#

IDK about pycharm shortcuts sorry.

hybrid vortex
#

It's not mandatory but if you care about performance it is important

#

I think you misunderstood me, instead of making GET, POST, DELETE, etc requests with the requests module, if you are using this data class in a Discord bot, I would recommend using the aiohttp module instead of the requests module for better performance, luckily requests and aiohttp are very similiar.

#

Ok got it! thumbsup

#

Is this code on Github?

cold lintel
#

I would avoid * imports in most cases btw Jake.

#

Because it's not as obvious what names have been created by the import.

#

The class I think.

hybrid vortex
#

Also something minor I noticed, instead of doing this

requests.get(f'https://thing.api?{key}={value}')

You should use the params keyword argument

requests.get(f'https://thing.api', params={key: value})
cold lintel
#

Is the latter approach less vulnerable @hybrid vortex?

cold lintel
#

Ah 😄

#

The error message usually has the file and line number.

#

Check the traceback

#

Hello @mellow stump

#

!eval ```py
print(''.join(chr(int(x, base=2)) for x in '01000110 01010101'.split()))

timid fjordBOT
#

@cold lintel :white_check_mark: Your eval job has completed with return code 0.

FU
cold lintel
#

That was urek's status 😄

#

Yo Griff

#

That's my name...

#

😄

#

I said "pasta" once in voice chat.

#

Maybe

#

I am a guy though. Sorry to ruin the mystique.

#

Jake, is your code for this bot on GitHub?

sturdy geyser
#

no not yet

#

should I push it now?

#

well when I get it to work

sage harness
#

please do

cold lintel
#

Oh wait

#

You weren't using the alternative constructor?

#

Erm, Jake really wanted to use a dataclass 😄

#

Earlier I recommended writing an alternative constructor:

#

Griff, check the previous discusssion this

#

No one else was here 😄

#

Alright, it's ok 😄

#

Yeah, so you could have a separate function that returns an instance of the dataclass, or you could make this function a method of the dataclass...

#

I think the original problem Jake was having was that he had a function that returned too many values to keep track of.

#

And Hemlock recommended a dataclass.

#

(NamedTuple also serves this purpose)

#
from dataclasses import dataclass
wide aurora
#

!e

from dataclasses import dataclass

@dataclass
class UserData:
  name: str
  attribute: str


class ApiThing:
  def __init__(self):
    ...

  def get_user(self, user_id) -> UserData:
    return UserData("Jake", "Smelly")


my_api = ApiThing()

user = my_api.get_user(123122345834587)
print(user.name, "is", user.attribute)
timid fjordBOT
#

@wide aurora :white_check_mark: Your eval job has completed with return code 0.

Jake is Smelly
cold lintel
#

Yeah, I usually restructure my programs like 10 times before I'm happy 😄

#

Uppercase method names lemon_grimace

#

Probably not rust...

#

Yeah 😄

broken talon
#

😔

cold lintel
#

Yeah Jake, can you please use snake_case 😄

#

player = OveralStatsAPI.from_user(username)

#

int(karma.replace(','. ''))

wide aurora
cold lintel
#

Oh yeah, it does.

#

Ah there's this band that does a lot of one-take videos....

wide aurora
#

link

cold lintel
#

OK Go

#

They filmed the whole video in like 5 seconds then slowed it down 😄

wide aurora
#

i watch

summer lance
#

what is the best platform for a marco in related programs in office 365

#

java ppython c++

balmy crater
#

i am server muted

#

can someone server unmute me

#

@drifting spruce

#

?

drifting spruce
#

lets see

balmy crater
#

do it rn

drifting spruce
#

dont just ping random people

balmy crater
#

ok

drifting spruce
#

you pinged people while they had the do not disturb sign on

#

that is very rude

balmy crater
#

sorry

drifting spruce
#

why are you server muted btw?

balmy crater
#

idk

drifting spruce
#

have you done voice verification?

#

!voice

timid fjordBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

toxic marsh
#

!e

timid fjordBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*

toxic marsh
#

!e def sum_even(start,end):
ans=0
for i in range(start,end):
if i%2==0:
ans+=i
return ans

print(sum_even(6,16))

timid fjordBOT
#

@toxic marsh :white_check_mark: Your eval job has completed with return code 0.

50
toxic marsh
#

!e

timid fjordBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*

toxic marsh
#

!e ```py
def sum_even(start,end):
ans=0
for i in range(start,end):
if i%2==0:
ans+=i
return ans

print(sum_even(6,16))

timid fjordBOT
#

@toxic marsh :white_check_mark: Your eval job has completed with return code 0.

50
sage hollow
#

!e
def sum

dire thunder
#

I am new to coding kind of, and can someone please explain id there is anyway to make an object using the console, for instance input() = object.name ?

#

or to change the variable in the object in t he console

primal bison
primal bison
ember light
#

hey is anyone free to help me with coding?

#

i just need someone to help guide me through my homework cuz im really lost

primal bison
timid fjordBOT
#

:incoming_envelope: :ok_hand: applied mute to @primal bison until 2021-03-14 05:08 (9 minutes and 58 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).

merry walrus
#

Awesome

whole furnace
#

wht

wide aurora
#

netstat -aof | findstr :25565

whole furnace
#

@jagged basin go to server properies

#

and then change the online mode to false

#

it bugs when you have mods

#

ping yourip:25565

#

local ip

wide aurora
#

curl host:port

whole furnace
#

@wide aurora are your local ip static?

#

@jagged basin do you have anything hosted on server?

#

and it is a windows server computer

#

in cmd type ngrok -help see if it work

wide aurora
#

Test-NetConnection 192.168.1.1 -p 25565

primal bison
#

Need hlep with git psuh heroku master

whole furnace
#

is it forwared by the router?

jagged basin
#

yep

whole furnace
#

@jagged basin go to open port checker and then type your public ipv4 with the port

jagged basin
#

doesnt work...

#

says its closed

whole furnace
#

ok

#

last option is using ngrok

wide aurora
whole furnace
#

@jagged basin is you public ip and wan ipv4 different?

wide aurora
#

@primal bison
CTRL + K to commit
CTRL + SHIFT + K to push

whole furnace
#

@jagged basin the ip that your router shows in its homepage

jagged basin
#

they are not i think

whole furnace
#

like this

#

router show the public ip in its homepage, i think?

#

you dont have that?

#

ok

#

it show at dashboard on my router

#

@jagged basin you can try ngrok

#

watch this it is just a tunnel maker to host the server

#

ok

sturdy geyser
#
def stringy(size):
    string = ""
    switch = True
    for i in range(size):
        if switch:
            string += "1"
            switch = False
        else:
            string += "0"
            switch = True
    return string
wide aurora
#
def stringy(size):
    return ''.join(str(int(not(i%2)))for(i)in(range(size)))
sturdy geyser
#
#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_basic_cases() {
        assert_eq!(generate_range(2, 10, 2), [2,4,6,8,10]);
        assert_eq!(generate_range(1, 10, 3), [1,4,7,10]);
        assert_eq!(generate_range(1, 10, 1), [1,2,3,4,5,6,7,8,9,10]);
        assert_eq!(generate_range(1, 10, 4), [1,5,9]);
        assert_eq!(generate_range(1, 10, 5), [1,6]);
    }
}
#
// Add your tests here.
// See https://doc.rust-lang.org/stable/rust-by-example/testing/unit_testing.html

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn basic_tests() {
        assert_eq!(is_divide_by(8, 2, 4), true);
        assert_eq!(is_divide_by(12, -3, 4), true);
        assert_eq!(is_divide_by(8, 3, 4), false);
        assert_eq!(is_divide_by(48, 2, -5), false);
        assert_eq!(is_divide_by(-100, -25, 10), true);
        assert_eq!(is_divide_by(10000, 5, -3), false);
        assert_eq!(is_divide_by(4, 4, 2), true);
        assert_eq!(is_divide_by(5, 2, 3), false);
        assert_eq!(is_divide_by(-96, 25, 17), false);
        assert_eq!(is_divide_by(33, 1, 33), true);
    }
}

#
fn is_divide_by(number: i32, a: i32, b: i32) -> bool {
    todo!()
}
wide aurora
#
fn is_divide_by(number: i32, a: i32, b: i32) -> bool {
    return number % a == 0 && number % b == 0;
}
sturdy geyser
#
#[cfg(test)]
mod tests {
    use super::zero_fuel;
    
    #[test]
    fn sample_tests() {
      assert_eq!(zero_fuel(50, 25, 2), true);
      assert_eq!(zero_fuel(100, 50, 1), false);
    }
}
#
fn zero_fuel(distance_to_pump: u32, mpg: u32, gallons: u32) -> bool {
  unimplemented!();
}
wide aurora
#
fn zero_fuel(distance_to_pump: u32, mpg: u32, gallons: u32) -> bool {
    return mpg * gallons >= distance_to_pump;
}
sturdy geyser
#
#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn basic_tests() {
        assert_eq!(expressions_matter(2, 1, 2), 6);
        assert_eq!(expressions_matter(1, 1, 1), 3);
        assert_eq!(expressions_matter(2, 2, 4), 16);
        assert_eq!(expressions_matter(3, 3, 3), 27);
        assert_eq!(expressions_matter(2, 1, 1), 4);
        assert_eq!(expressions_matter(1, 2, 3), 9);
        assert_eq!(expressions_matter(1, 3, 1), 5);
        assert_eq!(expressions_matter(2, 2, 2), 8);

        assert_eq!(expressions_matter(5, 1, 3), 20);
        assert_eq!(expressions_matter(3, 5, 7), 105);
        assert_eq!(expressions_matter(5, 6, 1), 35);
        assert_eq!(expressions_matter(1, 6, 1), 8);
        assert_eq!(expressions_matter(2, 6, 1), 14);
        assert_eq!(expressions_matter(6, 7, 1), 48);

        assert_eq!(expressions_matter(2, 10, 3), 60);
        assert_eq!(expressions_matter(1, 8, 3), 27);
        assert_eq!(expressions_matter(9, 7, 2), 126);
        assert_eq!(expressions_matter(1, 1, 10), 20);
        assert_eq!(expressions_matter(9, 1, 1), 18);
        assert_eq!(expressions_matter(10, 5, 6), 300);
        assert_eq!(expressions_matter(1, 10, 1), 12);        
    }
}
#
fn expressions_matter(a: u64, b: u64, c: u64) -> u64 {
    // Your Code here... Happy Coding!
}
safe mesa
#

👁️

wide aurora
#
fn expressions_matter(a: u64, b: u64, c: u64) -> u64 {    
    match vec![a*b*c, (a+b)*c, a*(b+c), a+b+c, (a*b)*c, a*(b*c)].iter().max() {
        Some(max) => return *max,
        None      => panic!("No Input"),
    }
}
safe mesa
#

||def expression_matter(a, b, c): return max(a*b*c, a+b+c, (a+b)*c, a*(b+c))||

sturdy geyser
vernal snow
#
void _if(bool value, std::function<void(void)> func1, std::function<void(void)> func2)
{
    value ? func1() : func2();
}
safe mesa
#
def _if(...):
    func1() if bool else func2()
sturdy geyser
vernal snow
wide aurora
#

|| ||

#

||____||

sturdy geyser
#

||Hey ass hole||

wide aurora
#

|| ur mother ||

wide aurora
#
fn infected(s: &str) -> f64 {
    let mut count: f64 = 0.0;
    for sub in s.split('X'){
        if sub.contains('1') {
            count += sub.len() as f64;
        }
    }
    let total: i64 = (s.len() - s.matches('X').count()) as i64;
    if total == 0 || count == 0 as f64 {
        return 0 as f64;
    }
    return 100.0 * count / (total as f64);
}
shadow ivy
sturdy geyser
#
def infected(s):
    infected = 0
    total_population = 0
    string = s.split("X")
    for i in string:
        total_population += len(i)
        if "1" in i:
            infected += len(i)
    try:
        percentage = 100*infected/total_population
    except ZeroDivisionError:
        return 0
    return percentage
#

@wide aurora see

#

I am not a failure

#

lets gooo

shadow ivy
sturdy geyser
sturdy geyser
hexed nexus
#
que = input("Encrypt or decrypt?(e, d): ")
if que == "d":
    inp = input("Text to decrypt: ")
else:
    inp = input("Text to encrypt: ")

a = {
    "q": 0,
    "a": 1,
    ",": 2,
    "y": 3,
    "x": 4,
    "-": 5,
    "s": 6,
    "w": 7,
    "e": 8,
    ";": 9,
    "d": 10,}
b = {
    0: "q",
    1: "a",
    2: ",",
    3: "y",
    4: "x",
    5: "-",
    6: "s",
    7: "w",
    8: "e",
    9: ";",
    10: "d",}


out = ""

if que == "d":
    for _ in range(len(inp)):
        out += b[a[inp[_]] + 1 if _ % 2 != 0 else a[inp[_]] - 1]
else:
    for _ in range(len(inp)):
        out += b[a[inp[_]] - 1 if _ % 2 != 0 else a[inp[_]] + 1]

print("\n"+out)

safe mesa
#
import string

string.ascii_lowercase
#

!paste

timid fjordBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

safe mesa
#

!e ```py
the_list = [str(i) for i in range(10)]

print(the_list[1:])
print(the_list[1:4])
print(the_list[::-1])
print(the_list[:-1])

timid fjordBOT
#

@safe mesa :white_check_mark: Your eval job has completed with return code 0.

001 | ['1', '2', '3', '4', '5', '6', '7', '8', '9']
002 | ['1', '2', '3']
003 | ['9', '8', '7', '6', '5', '4', '3', '2', '1', '0']
004 | ['0', '1', '2', '3', '4', '5', '6', '7', '8']
safe mesa
#

!e ```py
print('this is a message'[::-1])

timid fjordBOT
#

@safe mesa :white_check_mark: Your eval job has completed with return code 0.

egassem a si siht
hexed nexus
#

!e

var = 122
for i in range(26):
    print(chr(var))
    var += -1
timid fjordBOT
#

@hexed nexus :white_check_mark: Your eval job has completed with return code 0.

001 | z
002 | y
003 | x
004 | w
005 | v
006 | u
007 | t
008 | s
009 | r
010 | q
011 | p
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/aseterimuh.txt

safe mesa
wide aurora
#
static ASCII_LOWER: [char; 30] = [
    ' ',
    'z', 'y', 'x', 'w', 'v',
    'u', 't', 's', 'r', 'q',
    'p', 'o', 'n', 'm', 'l',
    'k', 'j', 'i', 'h', 'g',
    'f', 'e', 'd', 'c', 'b',
    'a', '!', '?', ' '
];

fn switcher(numbers: Vec<&str>) -> String {
    return numbers.into_iter().map(|num| ASCII_LOWER[num.parse::<u8>().unwrap() as usize]).collect();
}
safe mesa
#

enumerate

safe mesa
#

!e ```py
print(str(4))

timid fjordBOT
#

@safe mesa :white_check_mark: Your eval job has completed with return code 0.

4
safe mesa
#

ln[str(index)]

#

str(index)

#

!e ```py
the_dict = {1: 'a', 2: 'b'}
print(the_dict.get(1))

timid fjordBOT
#

@safe mesa :white_check_mark: Your eval job has completed with return code 0.

a
safe mesa
#

!e ```py
the_dict = {1: 'a', 2: 'b'}
print(the_dict.get(3))

timid fjordBOT
#

@safe mesa :white_check_mark: Your eval job has completed with return code 0.

None
safe mesa
#

!e ```py
the_dict = {1: 'a', 2: 'b'}
print(the_dict[3])

timid fjordBOT
#

@safe mesa :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 2, in <module>
003 | KeyError: 3
safe mesa
#

!e ```py
the_dict = {1: 'a', 2: 'b'}

value = the_dict.get(3)
if value:
print('Value found!')
else:
print('Not found.')

timid fjordBOT
#

@safe mesa :white_check_mark: Your eval job has completed with return code 0.

Not found.
safe mesa
#

bot#435

#

!server

timid fjordBOT
#
Server Information

Created: 4 years, 2 months and 7 days ago
Voice region: europe
Roles: 81
Member status: status_online 35182 status_offline 127306

Members: 162489

Helpers: 91
Moderators: 28
Admins: 13
Owners: 3
Contributors: 36

Channels: 215

Category: 27
News: 10
Staff: 55
Text: 113
Voice: 10

wide aurora
#
fn solution(s: &str) -> Vec<String> {
    let mut output: Vec<String> = vec![];

    for i in (0..s.len()).step_by(2) {
        println!("{}", s[i..i+2].to_string());
        output.append(s[i..i+2].to_string());
    }

    return output;
}
safe mesa
#

!src paginator

timid fjordBOT
#
Bad argument

Unable to convert 'paginator' to valid command, tag, or Cog.

#
Bad argument

Unable to convert 'pagination' to valid command, tag, or Cog.

safe mesa
#

!src LinePaginator

timid fjordBOT
#
Bad argument

Unable to convert 'LinePaginator' to valid command, tag, or Cog.

safe mesa
#
fn main() {
  println!("Hello world");
}
#

?

#

Java relates to JavaScript the same as ham to hamster.

sturdy geyser
#
fn main() {
    println!("hello world");
}
broken talon
shadow ivy
#

yahhhhhhhh mebbe tmrw

broken talon
#

😔

shadow ivy
#

i was happy i passed the initiation

#

cold sweat

broken talon
#

lol

pulsar parrot
#

what should i search up if i'm trying to stop a while loop after printing n amount of values?

broken talon
#

maybe i will get on my computer again 🤔

broken talon
pulsar parrot
#

hmm how so?

#

i'm not too familiar with for loops actually

safe mesa
shadow ivy
#

this one i like lol

pulsar parrot
#

beautiful

signal mirage
pulsar parrot
broken talon
signal mirage
#

lol

primal bison
#
for x in range(9):
    print(y, end=",")
    if x == 3:
        break
    y = y + x
print(y)
safe mesa
#

!e ```py
y = 5
for x in range(9):
print(y, end=",")
if x == 3:
break
y = y + x
print(y)

timid fjordBOT
#

@safe mesa :white_check_mark: Your eval job has completed with return code 0.

5,5,6,8,8
primal bison
#

output: 5,5,6,8,8

signal mirage
#

!comparison

timid fjordBOT
#

Assignment vs. Comparison

The assignment operator (=) is used to assign variables.

x = 5
print(x)  # Prints 5

The equality operator (==) is used to compare values.

if x == 5:
    print("The value of x is 5")
safe mesa
#

!e ```py
for x in range(9):
print(x)

timid fjordBOT
#

@safe mesa :white_check_mark: Your eval job has completed with return code 0.

001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
006 | 5
007 | 6
008 | 7
009 | 8
cold lintel
#
5 == 5
5 + 0 == 5
5 + 0 + 1 == 6
5 + 0 + 1 + 2 == 8
#

Yeah, it's a cool tool 😄

dapper quest
#

!e

    print(x)
hexed nexus
#

!e

print(2!)
timid fjordBOT
#

@hexed nexus :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     print(2!)
003 |            ^
004 | SyntaxError: invalid syntax
hexed nexus
#

!e

import math

var = 3
for i in range(99):
  var += - 1 / (math.factorial(i+2) * (i+1) * (i+2))
print(var)
timid fjordBOT
#

@hexed nexus :white_check_mark: Your eval job has completed with return code 0.

2.7182818284590455
hexed nexus
#

!e

import math

var = 3
for i in range(9999):
  var += - 1 / (math.factorial(i+2) * (i+1) * (i+2))
timid fjordBOT
#

@hexed nexus :warning: Your eval job timed out or ran out of memory.

[No output]
icy sky
#

!e

fact = lambda n: 1 if n <= 0 else n * fact(n - 1)
print(1 + sum([1/fact(n) for n in range(1, 100)]))
timid fjordBOT
#

@icy sky :white_check_mark: Your eval job has completed with return code 0.

2.7182818284590455
icy sky
#
my_list = list(range(20))
print(*map(lambda x: x**2, my_list))
primal bison
#

!e

@tasks.loop(seconds=8)
async def change_status():
    await client.change_presence(activity=discord.ActivityType.watching(next(status)))```
timid fjordBOT
#

@primal bison :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | NameError: name 'tasks' is not defined
rugged mirage
#

#Create a function to combine the values of the important columns into a single string
def get_important_features(data):
important_features = []
for i in range(0, data.shape[0]):
important_features.append(data['Actors'][i]+' '+data['Director'][i]+' '+data['Genre'][i]+' '+data['Title'][i])

return important_features                                                                                              #Create a column to hold the combined strings

df['important_features'] = get_important_features(df)

#Show the data
df.head(3)
This is my code although i am getting below error: Traceback (most recent call last)
<ipython-input-10-50d23e3e0015> in <module>()
1 #Create a column to hold the combined strings
----> 2 df['important_features'] = get_important_features(df)
3
4 #Show the data
5 df.head(3)

3 frames
/usr/local/lib/python3.7/dist-packages/pandas/core/internals/construction.py in sanitize_index(data, index)
746 if len(data) != len(index):
747 raise ValueError(
--> 748 "Length of values "
749 f"({len(data)}) "
750 "does not match length of index "

ValueError: Length of values (1) does not match length of index (1000)
Please help

#

#Create a function to combine the values of the important columns into a single string
def get_important_features(data):
important_features = []
for i in range(0, data.shape[0]):
important_features.append(data['Actors'][i]+' '+data['Director'][i]+' '+data['Genre'][i]+' '+data['Title'][i])

return important_features                                                                                              #Create a column to hold the combined strings

df['important_features'] = get_important_features(df)

#Show the data
df.head(3)
This is my code although i am getting below error: Traceback (most recent call last)
<ipython-input-10-50d23e3e0015> in <module>()
1 #Create a column to hold the combined strings
----> 2 df['important_features'] = get_important_features(df)
3
4 #Show the data
5 df.head(3)

3 frames
/usr/local/lib/python3.7/dist-packages/pandas/core/internals/construction.py in sanitize_index(data, index)
746 if len(data) != len(index):
747 raise ValueError(
--> 748 "Length of values "
749 f"({len(data)}) "
750 "does not match length of index "

ValueError: Length of values (1) does not match length of index (1000)
Please help

frank hearth
#

Put it in here 😄

calm ledge
#

Hello, can anyone help me in extracting table from a website using .py script?

carmine current
calm ledge
#

i have already claimed 3 help channels with no response for my problem

late agate
#

[cat, 3]

calm ledge
#

That dint worked for me

frank hearth
#
strings = ["asd", "def", "hello"]

print(add_sizes(strings))
# [("asd", 3), ("def", 3), ("hello", 5)]
carmine current
dapper quest
#

it's not

#

but it doesn't matter

frank hearth
#

It`s not the task but map is beautiful 😄

def add_sizes(strings: list[str]) -> list[tuple[int, str]]:
  return [*map(lambda s: (s, len(s)), strings)]
#

This is not the solution

#

BRO

#

its random yes

calm ledge
#

lemme try help channel once again by pasting the console error, last time i posted my hastebin code with problem statement

frank hearth
#

to generate test cases

icy sky
icy sky
#

noooo

frank hearth
#

Really?

icy sky
#

yes

#

this is usefull

frank hearth
#

Okay... confused 😄

#

useful.

icy sky
#

why ?

frank hearth
#

to "document" list of strings?

#

you mean this typing?

icy sky
#

yes

#

sorry

#

i meant the action of making a documentation

#

to documentate ?

#

no

#

i don't know

#
add_sizes = lambda S: [(s, len(s)) for s in S]
frank hearth
#

So you mean documentation like "typing" or what?

icy sky
#

yes yes

#

typing is the correct word

frank hearth
#

But it is 😄

#

Not really

#

true

carmine current
#

!e ```py
my_list = [1, 2]
print(type(my_list))

my_tuple = (1, 2)
print(type(my_tuple))

timid fjordBOT
#

@carmine current :white_check_mark: Your eval job has completed with return code 0.

001 | <class 'list'>
002 | <class 'tuple'>
primal bison
#

Oh lol 😄

#

@carmine current How is it going?

#

Oh same

#

@carmine current I'm actually doing an exam which is against adults, and I can't wait to show them my skills and knowledge.

carmine current
#

!e ```py
print(list("my string"))

timid fjordBOT
#

@carmine current :white_check_mark: Your eval job has completed with return code 0.

['m', 'y', ' ', 's', 't', 'r', 'i', 'n', 'g']
primal bison
#

!e ```python
print("my string".split())

timid fjordBOT
#

@primal bison :white_check_mark: Your eval job has completed with return code 0.

['my', 'string']
primal bison
#

Oh ok sorry about that

#

list() covert to list

late agate
#
print(list(puzzle.split))
primal bison
#

!e ```python
print(list("my string")[0])

timid fjordBOT
#

@primal bison :white_check_mark: Your eval job has completed with return code 0.

m
primal bison
#

@frank hearth Hey, Dont make others feel discomfortable

#

Be nice

#

Good lad

frank hearth
#

im nice

#

YOU NOT NICE

primal bison
#

Lol

frank hearth
#

There is no voice

primal bison
#

That's what she said

#

@frank hearth Why did you leave?

frank hearth
#

I want to type

primal bison
#

Just mute yourself and type

#

Come on join

#

I'm bored as someone you don't know

carmine current
#

!e ```py
a = [1, 3, 2]

a[1] = 5

print(a)

timid fjordBOT
#

@carmine current :white_check_mark: Your eval job has completed with return code 0.

[1, 5, 2]
carmine current
#
a = ["a", "b", "c"]
#
index = 2
late agate
#

a[2] = ["a", "b", "c"]

carmine current
#

!e ```py
a = ["a", "b", "c"]
index = 2
a[2] = ["a", "b", "c"]
print(a)

timid fjordBOT
#

@carmine current :white_check_mark: Your eval job has completed with return code 0.

['a', 'b', ['a', 'b', 'c']]
late agate
#

print(2)

#

print[2]