#voice-chat-text-0

1 messages Β· Page 200 of 1

sour willow
#

have it all in a lambda func in the secondary dimensional array

#

(im not experienced with python)

thin fox
#

I'll accept your cookies

short owl
#

ahhhhh the mere mention of coffee

sour willow
#

imma head out if anyone could help just ping

oblique ridge
wise cargoBOT
#

@whole bear :warning: Your 3.12 eval job has completed with return code 0.

[No output]
sour willow
#

yeah doesnt matter

#

im just wondering if i can make it shorter

whole bear
#

!e

print([list(range(1+(n*10), (n*10)+10)) for n in range(0, 10)])
wise cargoBOT
#

@whole bear :white_check_mark: Your 3.12 eval job has completed with return code 0.

[[1, 2, 3, 4, 5, 6, 7, 8, 9], [11, 12, 13, 14, 15, 16, 17, 18, 19], [21, 22, 23, 24, 25, 26, 27, 28, 29], [31, 32, 33, 34, 35, 36, 37, 38, 39], [41, 42, 43, 44, 45, 46, 47, 48, 49], [51, 52, 53, 54, 55, 56, 57, 58, 59], [61, 62, 63, 64, 65, 66, 67, 68, 69], [71, 72, 73, 74, 75, 76, 77, 78, 79], [81, 82, 83, 84, 85, 86, 87, 88, 89], [91, 92, 93, 94, 95, 96, 97, 98, 99]]
whole bear
#

some function on this range(1, 101)

short owl
#

tabulate OR itertools which is better

oblique ridge
#

!e

from itertools import count, islice

numbers = count(start=1)
result = [list(islice(numbers, 9)) for _ in range(11)]

for row in result:
    print(row)
wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
002 | [10, 11, 12, 13, 14, 15, 16, 17, 18]
003 | [19, 20, 21, 22, 23, 24, 25, 26, 27]
004 | [28, 29, 30, 31, 32, 33, 34, 35, 36]
005 | [37, 38, 39, 40, 41, 42, 43, 44, 45]
006 | [46, 47, 48, 49, 50, 51, 52, 53, 54]
007 | [55, 56, 57, 58, 59, 60, 61, 62, 63]
008 | [64, 65, 66, 67, 68, 69, 70, 71, 72]
009 | [73, 74, 75, 76, 77, 78, 79, 80, 81]
010 | [82, 83, 84, 85, 86, 87, 88, 89, 90]
011 | [91, 92, 93, 94, 95, 96, 97, 98, 99]
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/KMQ7H44HA2LMUU4DF5MOQKJD5M

stuck furnace
#

!e In python 3.12, you can now do this: ```py
from itertools import batched
mylist = list(batched(range(1, 101), n=10))
print(mylist)

wise cargoBOT
#

@stuck furnace :white_check_mark: Your 3.12 eval job has completed with return code 0.

[(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), (11, 12, 13, 14, 15, 16, 17, 18, 19, 20), (21, 22, 23, 24, 25, 26, 27, 28, 29, 30), (31, 32, 33, 34, 35, 36, 37, 38, 39, 40), (41, 42, 43, 44, 45, 46, 47, 48, 49, 50), (51, 52, 53, 54, 55, 56, 57, 58, 59, 60), (61, 62, 63, 64, 65, 66, 67, 68, 69, 70), (71, 72, 73, 74, 75, 76, 77, 78, 79, 80), (81, 82, 83, 84, 85, 86, 87, 88, 89, 90), (91, 92, 93, 94, 95, 96, 97, 98, 99, 100)]
#

@whole bear :white_check_mark: Your 3.12 eval job has completed with return code 0.

[(<list_iterator object at 0x7f837cd574c0>,), (<list_iterator object at 0x7f837cd574c0>,), (<list_iterator object at 0x7f837cd574c0>,), (<list_iterator object at 0x7f837cd574c0>,), (<list_iterator object at 0x7f837cd574c0>,), (<list_iterator object at 0x7f837cd574c0>,), (<list_iterator object at 0x7f837cd574c0>,), (<list_iterator object at 0x7f837cd574c0>,), (<list_iterator object at 0x7f837cd574c0>,), (<list_iterator object at 0x7f837cd574c0>,)]
whole bear
#

!e

i = iter(list(range(1, 101)))
print(list(zip(*([i] * 10))))
wise cargoBOT
#

@whole bear :white_check_mark: Your 3.12 eval job has completed with return code 0.

[(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), (11, 12, 13, 14, 15, 16, 17, 18, 19, 20), (21, 22, 23, 24, 25, 26, 27, 28, 29, 30), (31, 32, 33, 34, 35, 36, 37, 38, 39, 40), (41, 42, 43, 44, 45, 46, 47, 48, 49, 50), (51, 52, 53, 54, 55, 56, 57, 58, 59, 60), (61, 62, 63, 64, 65, 66, 67, 68, 69, 70), (71, 72, 73, 74, 75, 76, 77, 78, 79, 80), (81, 82, 83, 84, 85, 86, 87, 88, 89, 90), (91, 92, 93, 94, 95, 96, 97, 98, 99, 100)]
stuck furnace
#

Without batched, I'd do something like this:```py
mylist = [
[10*i + j + 1 for j in range(10)]
for i in range(10)
]

#

Let me just check that's correct πŸ˜…

#

!e ```py
mylist = [
[10*i + j + 1 for j in range(10)]
for i in range(10)
]
print(mylist)

wise cargoBOT
#

@stuck furnace :white_check_mark: Your 3.12 eval job has completed with return code 0.

[[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [71, 72, 73, 74, 75, 76, 77, 78, 79, 80], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [91, 92, 93, 94, 95, 96, 97, 98, 99, 100]]
whole bear
wise cargoBOT
#

@whole bear :white_check_mark: Your 3.12 eval job has completed with return code 0.

[(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), (2, 2, 2, 2, 2, 2, 2, 2, 2, 2), (3, 3, 3, 3, 3, 3, 3, 3, 3, 3), (4, 4, 4, 4, 4, 4, 4, 4, 4, 4), (5, 5, 5, 5, 5, 5, 5, 5, 5, 5), (6, 6, 6, 6, 6, 6, 6, 6, 6, 6), (7, 7, 7, 7, 7, 7, 7, 7, 7, 7), (8, 8, 8, 8, 8, 8, 8, 8, 8, 8), (9, 9, 9, 9, 9, 9, 9, 9, 9, 9), (10, 10, 10, 10, 10, 10, 10, 10, 10, 10), (11, 11, 11, 11, 11, 11, 11, 11, 11, 11), (12, 12, 12, 12, 12, 12, 12, 12, 12, 12), (13, 13, 13, 13, 13, 13, 13, 13, 13, 13), (14, 14, 14, 14, 14, 14, 14, 14, 14, 14), (15, 15, 15, 15, 15, 15, 15, 15, 15, 15), (16, 16, 16, 16, 16, 16, 16, 16, 16, 16), (17, 17, 17, 17, 17, 17, 17, 17, 17, 17), (18, 18, 18, 18, 18, 18, 18, 18, 18, 18), (19, 19, 19, 19, 19, 19, 19, 19, 19, 19), (20, 20, 20, 20, 20, 20, 20, 20, 20, 20), (21, 21, 21, 21, 21, 21, 21, 21, 21, 21), (22, 22, 22, 22, 22, 22, 22, 22, 22, 22), (23, 23, 23, 23, 23, 23, 23, 23, 23, 23), (24, 24, 24, 24, 24, 24, 24, 24, 24, 24), (25, 25, 25, 25, 25, 25, 25, 25, 25, 25), (26, 26, 26, 26, 26, 26, 26, 26, 26, 26
... (truncated - too long)

Full output: https://paste.pythondiscord.com/OXATW6CETKM3QXZKCYHSO5BUFM

sour willow
#

yeah tried that gave an error

#

i think imma use alex's for now since thats the only one i can fully understand

#

well those were cool thnx to all of you guys

oblique ridge
#

!e ```py
from itertools import count, islice
result = [list(islice(count(start=1), 9)) for _ in range(11)]
print(*result, sep='\n')

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
002 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
003 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
004 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
005 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
006 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
007 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
008 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
009 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
010 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
011 | [1, 2, 3, 4, 5, 6, 7, 8, 9]
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/TXGVSEPGPM4WZOF4DAHJQSOH4M

sour willow
#

imma head out now , again thanks to everyone

stuck furnace
#

This is approximately the same as itertools.batched (although will truncate the iterable if its length is not a multiple of n): ```py
def batched(iterable, n):
iterators = [iter(iterable)] * n
return zip(*iterators)

#

Understanding how the above works is a good exercise for better understanding iterators.

#

Btw, if you're using an older version of python, there are a bunch of recipes at the bottom of the itertools documentation for functions that may be added in later versions. https://docs.python.org/3.11/library/itertools.html?highlight=itertools#itertools-recipes

#

Some of them are pretty handy. I think all of them are in the third-party more-itertools package.

short owl
#

would itertools ( looping ) improve speed in a tkinter loop ????

whole bear
#

no one knows

#

i didnt mean to be discouraging but something like this is what you have to try and find out

gentle flint
#

with timeit

rugged root
#

Harder to test something like that given all the additional overhead running

oblique ridge
#

perf_counter and cProfile gang

short owl
#

itertools for efficiency is sparking a curioussity - seen it mentioned many times here there

whole bear
#

sure but if the difference is not noticiable, is the optimization even worth it

#

itertools is just a library of functions which work on iterators

oblique ridge
#

itertools is like crack and i feel like i'm cheating every time i use it

whole bear
#

iterators are actually not an optimization technique but just a way to abstract away pure for and while loops

#

what you would do using iterators, would translate the a for/while loop in C

#

in an imperative way vs declarative way

short owl
#

maybe good for fast translating , 32 bit data tables ( for ASM - assembler ) , cross CPU assembler translating , CHIP-8 and others , wink wink

whole bear
#

leetcode absolutely cannot test ones skills

#

most leetcode problems are solvable only if you knew the solution beforehand

rugged root
#

That's one of the things I hate about it

stuck furnace
#

It's just companies copying Google

rugged root
#

This

#

Rabbit says it the best, people need to stop trying to copy FAANG

#

Odds are good that what they're doing do not apply to x company

whole bear
#

does zip return a iterator of iterators or an iterator of tuples

stuck furnace
#

The latter, I think, yeah.

whole bear
#

shouldn't it be the former?

#

because tuples would allocate memory

stuck furnace
#

The assumption is that tuples are short and of known length.

#

...conventionally.

rugged root
#

!d zip

wise cargoBOT
#
zip

zip(*iterables, strict=False)```
Iterate over several iterables in parallel, producing tuples with an item from each one.

Example:

```py
>>> for item in zip([1, 2, 3], ['sugar', 'spice', 'everything nice']):
...     print(item)
...
(1, 'sugar')
(2, 'spice')
(3, 'everything nice')
```...
whole bear
#

yea but it still would allocate the size of tuple every iteration and deallocate it

oblique ridge
#

!e ```py
some_list = [1, 2, 3]
some_zip = zip(some_list)
print(type(some_zip))
print(type(next(some_zip)))

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | <class 'zip'>
002 | <class 'tuple'>
oblique ridge
whole bear
#

i guess the internal allocator would somehow deal with repeated allocation and deallocation of this tuple

stuck furnace
#

Conventionally, tuples are analogous to C structs. I.e. they're used to represent a grouping of a handful of elements of hetrogenous type.

whole bear
#

but they wont be ever stored on the C stack

stuck furnace
#

But they're sometimes used as "just an immutable list".

short owl
#

did you ever have a , Kim-1 , computer ? @rugged root

stuck furnace
oblique ridge
#
>>> some_list = ['a', 'b', 'c']
>>> some_tuple = (some_list, 'd', 'e')
>>> some_tuple[0] += 'f'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> some_tuple
(['a', 'b', 'c', 'f'], 'd', 'e')
short owl
#

comparing , CHIP-8 and KIM-1 , asm code @rugged root

stuck furnace
#

Weird how the item is added despite the exception pithink

rugged root
#

Gotta love it

whole bear
#

<-

#

list = list + element

rugged root
#

!e

meats = ["ham", "pork", "beef"]
tuple_ = (meats, 3, 4)
tuple_[0].append("spam")
print(tuple_)
wise cargoBOT
#

@rugged root :white_check_mark: Your 3.12 eval job has completed with return code 0.

(['ham', 'pork', 'beef', 'spam'], 3, 4)
whole bear
#

Vec::with_capacity(10)

oblique ridge
#
[None for _ in range(10)]
rugged root
#

!e

meats = {"ham": 1, "pork": 2, "beef": 3}
tuple_ = (meats, 3, 4)
tuple_[0]["spam"] = 5
print(tuple_)
oblique ridge
#

!e ```
l = [None]*10
print(l)

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

[None, None, None, None, None, None, None, None, None, None]
#

@rugged root :white_check_mark: Your 3.12 eval job has completed with return code 0.

({'ham': 1, 'pork': 2, 'beef': 3, 'spam': 5}, 3, 4)
oblique ridge
#

!e ```py
import sys
print(sys.getsizeof([]))
print(sys.getsizeof([None for _ in range(10)]))
print(sys.getsizeof([None]*10))

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 56
002 | 184
003 | 136
whole bear
#
(0..10).collect::<Vec<_>>()
#

so an ExactSizedIterator would know its exact length

#

and like that could be used for some optimizations

#

yea the main bottleneck is bad cache performance

#

due to everything being a reference

#

cat /dev/zero >> /dev/ram0

rugged root
oblique ridge
short owl
#

its a pork dumpling

whole bear
#

gomonade

short owl
#

blue gatorade + hydrocarbon + lemon_wedge

whole bear
#

gotorade

#

warm up your monads

rugged root
stuck furnace
#

Lisp has an interesting mascot πŸ˜„

short owl
#

what ??????

#

space monster

whole bear
short owl
#

tread softly carry a big trunk..

sour willow
#

wait is alex lp?

rugged root
#

No, very different person

sour willow
#

that profile really reminded me of lp for some odd reason

rugged root
#

@thorn sequoia What's the context?

quaint oyster
#

smh lp

#

did he get fired from microsoft yet

whole bear
#

@stuck furnace would you let me stream

short owl
#

choice coffee + boxes of donuts = mighty fine bribe

stuck furnace
stuck furnace
whole bear
#

coding

stuck furnace
#

Sure πŸ‘

whole bear
#

thanks

stuck furnace
#

!stream 939196353362419722 1h

wise cargoBOT
#

βœ… @whole bear can now stream until <t:1697138220:f>.

sour willow
whole bear
#

actually ricing

#

arch

sour willow
whole bear
#

shod

stuck furnace
whole bear
#

theprimagen

oblique ridge
stuck furnace
#

Has anyone had an issue on windows where your time keeps getting 1 hour out of sync? pithink

whole bear
#

i am one of the people of all time

stuck furnace
#

Yeah it's really weird.

#

Erm, we do have summer time. I can't remember whether it's in the summer or winter where we're off from UTC by one hour.

gentle flint
whole bear
pulsar light
#

@oblique ridge

oblique ridge
#

yo

pulsar light
#
def power(base,power_num):
    result = 1
    for i in range(power_num):
        if power_num == 0:
            result = 1
        elif power_num == 1:
            result = base
        elif power_num > 1:
            result = result * base
    return result
    
print(power(2,3))
rugged root
whole bear
#

is there a library to parse derive(Debug) from rust in python?

umbral stone
#

anyone knows how to replace the python version in windows like i have python 11 so how can i do into python 12

oblique ridge
#

but it's the exact same idea

#

but, wouldn't you want to do your if power_num checks outside your loop?

tall ridge
rugged root
#

Huh, neat

tall ridge
#

I'll be AFK

prime bobcat
#

whats the output of round 1.5?

oblique ridge
oblique ridge
prime bobcat
#

what why

oblique ridge
#

floating point arithmetic magic

prime bobcat
#

1.51 makes sense

#

but 1.50

rugged root
oblique ridge
#

1.50 should round up to 2

#

decimal 2.5 should also round up to 3

#

but we're working with floats, not decimals

prime bobcat
#

i hear you btw

#

i cant talk yet

oblique ridge
#
>>> round(Decimal(1.5))
2
>>> round(Decimal(2.5))
2
rugged root
gentle flint
prime bobcat
#

the chicken without head?

#

Mike the Headless Chicken

oblique ridge
prime bobcat
#

im trying to solve the round problem but i got stuck lol

#

throw that thing away and let us know where

#

example 1.51

#

take 1.51 as X
y = x/x with only 2 characters thas equals 1.5

#

take 1.51 and divide by 1.5

#

1.50/1.5 = 1

#

1.51/1.5 = 1.006

#

so you can solve this

prime bobcat
gilded rivet
prime bobcat
#

how do you solve that then if your number has 200000 decimals

gilded rivet
#

You use alternative ways of representing the number

prime bobcat
#

even if i compare them?

#

will be the same

#

oh

#

sorry im new with this lol

#

didnt knew " " = ' '

rugged root
prime bobcat
#

but what if im working with large numbers of data

#

oh

rugged root
prime bobcat
#

dm code

#

lol

#

Floating-point arithmetic is considered an esoteric subject by many people

#

oh they talk about the rounding error

#

i think w3schools doesnt have all the methods at least if you dont look for them for youself

sturdy panther
#

Use regex πŸ™ƒ

pulsar light
#

@oblique ridge also for neg numbers:```py
def power(base,power_num):
result = 1
for i in range(power_num):
if power_num == 0:
result = 1
elif power_num == 1:
result = base
elif power_num > 1:
result = result * base
for _ in range(power_num, 0):
if power_num < 1:
result = result / base
return result

print(power(2,-3))

still shell
#

yo what up

oblique ridge
#

nice

prime bobcat
#

my wife customized my keyboard to encourage me to coding lol

sour willow
prime bobcat
#

idk

#

but someone supporting you is cool

#

im stuck with some stuff and is hard to keep learning

#

i hate the loops

#

hello sir

alpine crow
pulsar light
#

ahh he told me to not use it for learnin purposes

alpine crow
#

valid reason lol

pulsar light
#

haha

alpine crow
#

nice function tho

pulsar light
#

thanks

#

u know ^python?

alpine crow
#

yeah

pulsar light
#

well he can make 2^0

#

lets say he just learned this shit

#

haha

alpine crow
#

yeah if u put 2,0 for i in (0) does nothing

pulsar light
#

give me smt to do to up my lvl in coding

alpine crow
#

it just skips the whole for loop

#

thats all I mean

pulsar light
alpine crow
#

but since u set the result to 1 already it doesnt matter

#

yeah lol

pulsar light
#

ahh i see

#

i did that on purpose

toxic arch
#

why are you speaking here if not in vc

alpine crow
#

lol bc the chats were here

toxic arch
#

life

#

is roblox

#

NAHH

#

WTFF

#

true..

#

liufe is defo python

#

wrong chat

#

nahhhh wrong chat

#

guys

#

do you wannna see my discord bot?

#

can you give mea star

#

pls

#

yay

alpine crow
#

not bad

pulsar light
toxic arch
#

i broke python wtf

alpine crow
toxic arch
#

cool bot

#

send github link

#

yay

#

i got a star

pulsar light
toxic arch
pulsar light
toxic arch
#

words?

#

oh hangman

#

i done fucked up my python

#

install

#

smh

#

nah

#

we cant

#

we need a role

#

still cant stream

#

can we call a mod

pulsar light
#

@rugged root

toxic arch
#

i love his

#

pfp

#

eh it can be improved

#

yeah but everything

#

can be imprtoved

stuck furnace
#

Hello πŸ‘€

toxic arch
#

oh cmon on

stuck furnace
toxic arch
#

it says python already exists

#

but it doesnt

stuck furnace
#

Erm, who wants to share screen sorry?

#

Alright

#

My minds blanked an I've forgotten the command one sec πŸ˜…

#

!stream 133817562646577153 1h

wise cargoBOT
#

βœ… @alpine crow can now stream until <t:1697147519:f>.

toxic arch
#

broo im stuck

#

it wont let me unisntall python

#

but

#

i cant install it

stuck furnace
toxic arch
pulsar light
#

hah how?

stuck furnace
#

What happens when you try to uninstall?

toxic arch
stuck furnace
#

Let me know if that works.

toxic arch
#

damn rip my modules i installed then

#

hmm i wonder if i can find my old

#

coin counter thing

#

!paste

wise cargoBOT
#
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.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

toxic arch
#

@alpine crow try

#

this code

whole bear
#

yo i just made a python script that helps you find any info about any topic its really helpful for research. lmk if you want the link i promise to you its not malicious i swear on my life i just made it safe and helpful. i just want to make researching easier. + it gives you MLA citations for each article without needing easybib or an equivalent
I originally made it for myself but put it up on github

toxic arch
#

nope @stuck furnace it didnt work

prime bobcat
#

i love python

#

is beautiful

stuck furnace
toxic arch
#

in appdata

stuck furnace
#

Ah right. And you tried repairing after deleting that folder?

stuck furnace
# toxic arch

Did you have python installed on a different drive?

toxic arch
#

but its not plugged in

#

i dont have access to it right now

stuck furnace
prime bobcat
#

guys how many space i need for all python methods

stuck furnace
toxic arch
#

what

prime bobcat
#

just in case someone would get a tatoo of them

#

lol

#

do you think i have plenty space on my body, only visible parts for me

stuck furnace
#

All python methods pithink

toxic arch
#

its still there

#

i mean

#

the error

prime bobcat
#

and what about methods and simple examples

stuck furnace
prime bobcat
#

small ones

stuck furnace
#

Β―_(ツ)_/Β―

toxic arch
alpine crow
toxic arch
prime bobcat
#

maybe only the name

#

and if i see them ill try to memorize everything

#

i will try and let you know exactly how much

alpine crow
prime bobcat
alpine crow
alpine crow
prime bobcat
#

oh yeah, thats better

#

i had problems calling stuff from a dictionary on another module

#

and w3schools doesnt have a lot of explanation

haughty fog
#

yea, s-lang would work

prime bobcat
#

hello aim

#

im realizing, maybe i cant get all of the python methods tattooed

pulsar light
toxic arch
#

@lavish rover do you know where i can remove this on windows

haughty fog
toxic arch
#

where on earth does it store this?

stuck furnace
lavish rover
#

i don't really use windows, not sure

toxic arch
#

i deleted mutiple registries

#

but it still perseits

prime bobcat
pulsar light
stuck furnace
toxic arch
#

ngl troubleshooters never worked for me

#

but worth a shot ig

stuck furnace
#

Β―_(ツ)_/Β―

#

Code jam is once a year in the summer. PyWeek is twice a year.

#

PyWeek isn't actually organised by us but the code jam is.

toxic arch
#

theres like 30 different pythons here

#

i cant even bulk select

#

brooo

haughty fog
# prime bobcat whats s lang?

s-lang (snake-language)
the best programming language, all functions are different lengths of "s"s and any other letter beside "s" are seen as a comment

"hello world" would be:
s ('s+8 s+5 s+12 1s+2 s+0 s+15 s+23 s+15 s+18 s+12 s+4')

prime bobcat
#

wtf

#

whats s+8?

lavish rover
#

!resources

wise cargoBOT
#
Resources

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

haughty fog
#

0= blank, a = 1, b= 2, so on

#

very productive

lavish rover
#
from random import choice
while True:
  input("Enter Rock/Paper/Scissors:")
  print(choice(["You win!", "You lose", "draw"]))
prime bobcat
#

s+8 = h?

haughty fog
#

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

prime bobcat
#

im looking for a different slang?

toxic arch
#

whoever told me to install python to a disk

#

dont do that

#

any way to get the modules like tkinter in a python embdeded paCKAGE?

#

i found the disk

prime bobcat
#

aim you trolling me?

#

:c

stuck furnace
toxic arch
#

it says tkinker not found

#

spooky music

#

in reccomended

lavish rover
toxic arch
#

why not

#

@alpine crow

#

its thew namer of the savefile in lbp

#

look

prime bobcat
#

i had that question too

toxic arch
#

lmao

prime bobcat
#

pygame has sound?

toxic arch
#

yes i did that

#

for some tool

prime bobcat
#

playsound module for tkinter?

toxic arch
#
    import winsound
    duration = 1000  # milliseconds
    freq = 440  # Hz
    winsound.Beep(freq, duration)
#

this works

#

yay my python fixed now

stuck furnace
toxic arch
#

and uninstalled it

stuck furnace
#

Ah right I see

toxic arch
#

sad though

#

sigh i told them soo many times to install python on the pcs

#

but they wont

pulsar light
#

colatz

#

conjecture

stuck furnace
#

.xkcd 710

viscid lagoonBOT
#

The Strong Collatz Conjecture states that this holds for any set of obsessively-hand-applied rules.

toxic arch
#

rabbit hole

stuck furnace
#

I used Google pithink

#

I don't have xkcd numbers memorised πŸ˜„

pulsar light
#

haha

toxic arch
#

guys notepad++ best code

#

writer?

pulsar light
#

nah cmd dubs

toxic arch
pulsar light
#

its just do

toxic arch
#

old code

#

the code btw

#

broo its soo bad

alpine crow
#

!e py def collatz(n): if n == 1: return 1 elif n % 2 == 0: print(n) return collatz(n/2) else: print(n) return collatz(3*n+1) collatz(4) collatz(21)

wise cargoBOT
#

@alpine crow :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 4
002 | 2.0
003 | 21
004 | 64
005 | 32.0
006 | 16.0
007 | 8.0
008 | 4.0
009 | 2.0
toxic arch
#

!e

def collatz(n):
    if n == 1:
        return 1
    elif n % 2 == 0:
        print(n)
        return collatz(n/2)
    else:
        print(n)
        return collatz(3*n+1)
collatz(4)
collatz(23423423)
wise cargoBOT
#

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

001 | 4
002 | 2.0
003 | 23423423
004 | 70270270
005 | 35135135.0
006 | 105405406.0
007 | 52702703.0
008 | 158108110.0
009 | 79054055.0
010 | 237162166.0
011 | 118581083.0
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/CRMLNY7GGGH7VNEYZF6Q2OUWEY

alpine crow
#

In computability theory, the halting problem is the problem of determining, from a description of an arbitrary computer program and an input, whether the program will finish running, or continue to run forever. The halting problem is undecidable, meaning that no general algorithm exists that solves the halting problem for all possible program–in...

toxic arch
#

Inocorrect

#

brooo

pulsar light
#

YESSSSSSS

alpine crow
toxic arch
#

how to fix this

alpine crow
#

this problem can't be solved by computers bc of the halting problem

toxic arch
#

i swear it was working fine before

alpine crow
#

I dont use tkinter πŸ₯Ή

toxic arch
#

what ya use

#

instead

alpine crow
#

I dont really make gui in python

#

html lol

toxic arch
#

damn

lavish rover
#
import sys

lines = open(sys.argv[1]).read().split('\n')
if lines == []: exit(0)

height = max([len(line) for line in lines])
width = height + len(lines) - 1
matrix = [[' ' for x in range(width)] for y in range(height)]

for i, line in enumerate(lines):
    llen = len(line)
    for j, char in enumerate(line):
        matrix[height-j-1][i+j] = char

for line in matrix:
    print(''.join(line))
toxic arch
#

k i fixed it

#

gui can be variable size

#

nice

lavish rover
#
hello there
test
this is the diagonalizer

to

                         r
                        e 
                       z  
                      i   
                     l    
                    a     
                   n      
                  o       
                 g        
                a         
               i          
              d           
                          
          e e             
         r h              
        e t               
       h                  
      t s                 
       i                  
    o                     
   lts                    
  lsi                     
 eeh                      
htt                       
toxic arch
#

@alpine crow brother do you follow the calling convetions of c/c++

#

in your custom code thing

#

man

#

tkinker is finicky

#

time to make a search bar

#

11:01pm here

stuck furnace
#

πŸ‘‹

toxic arch
#

england

#

wait 12am

#

?

#

@pulsar light you stil lthere?

#

guess not

pulsar light
toxic arch
#

yes

#

no

#

i dont know anything

toxic arch
#

why is there a extra bracket here

#

thje blue one

#

its extra

#

no

#

that the yellow one

#

slowly coming together...

#

yess looks good

wise loom
toxic arch
#

cya

toxic arch
#

wait

#

let me watch

#

of course

#

i got anti adblock

#

but i got a filtere to bypass it

#

ez

wise loom
toxic arch
#

is that you madr that?

#

btw

wise loom
#

I didn't make it, but liked the idea

shy raft
#

hi guys

wise loom
#

remember when Unity changed the pricing scheme on their licenses to charge game developers per install?

#

and their CEO quit his job a few months after the decision because it backfired

toxic arch
#

2014 they still be coding from scratch

#

well they reuse their own engines

wise loom
#

he thought he was so clever, such a big brain and financially-driven economist mind..

#

and then he quit

#

F that guy

toxic arch
#

GAVILÁN II (Visualizer) - Peso Pluma, Tito Double P

Double P RecordsΒ©

➸ ESCUCHA / LISTEN GΓ‰NESIS: https://orcd.co/ppgenesis

➸Música
InterpretaciΓ³n - Peso Pluma, Tito Double P
ComposiciΓ³n - Jesus Roberto Laija Garcia
ProducciΓ³n - JesΓΊs IvΓ‘n Leal Reyes β€œParka”, JesΓΊs Roberto Laija GarcΓ­a

➸Letra

Chau!

Ya me escucharon por ahΓ­
mitotes han ...

β–Ά Play video
somber heath
#

@naive ravine πŸ‘‹

naive ravine
#

Ψ§Ω‡

#

hi

naive ravine
#

coucou

#

i want help in program

#

but the question is with french language

somber heath
#

Sorry. πŸ™‚

#

I only know English.

naive ravine
#

Ecrire un programme en Python qui demande Γ  l'utilisateur de saisir deux nombres a et b et de lui afficher leur maximum.

somber heath
#

!d max

wise cargoBOT
#
max

max(iterable, *, key=None)``````py

max(iterable, *, default, key=None)``````py

max(arg1, arg2, *args, key=None)```
Return the largest item in an iterable or the largest of two or more arguments.

If one positional argument is provided, it should be an [iterable](https://docs.python.org/3/glossary.html#term-iterable). The largest item in the iterable is returned. If two or more positional arguments are provided, the largest of the positional arguments is returned.

There are two optional keyword-only arguments. The *key* argument specifies a one-argument ordering function like that used for [`list.sort()`](https://docs.python.org/3/library/stdtypes.html#list.sort). The *default* argument specifies an object to return if the provided iterable is empty. If the iterable is empty and *default* is not provided, a [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) is raised.
naive ravine
#

fonction max

somber heath
#

!e py print(max(10, 5))

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

10
naive ravine
#

i didn t know thatther s a fanction max

#

how can i do it without max funct

somber heath
#

!e py print(5 > 10)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

False
somber heath
#

!e py print(5 < 10) print(5 == 10)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | True
002 | False
somber heath
#

!e py if 5 > 10: print('A') else: print('B')

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

B
naive ravine
#

!e

wise cargoBOT
#
Missing required argument

code

naive ravine
#

!e print(max(10,200))

wise cargoBOT
#

@naive ravine :white_check_mark: Your 3.12 eval job has completed with return code 0.

200
somber heath
#

!e py arr = [5, 1, -10, +4, 10] print(max(arr))

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

10
naive ravine
#

thnks

somber heath
#

!e py float('*#Β£@1gh')

wise cargoBOT
#

@somber heath :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     float('*#Β£@1gh')
004 | ValueError: could not convert string to float: '*#Β£@1gh'
somber heath
#

!e py try: float('*#Β£@1gh') except ValueError: print('A')

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

A
somber heath
#

!e py v = 0 while v != 5: print(v) v += 1 print('.')

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
006 | .
somber heath
#

!e py for i in range(5): print(i)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
somber heath
#

while: if
for: =

#

!e py while True: ... # Eternity

wise cargoBOT
#

@somber heath :warning: Your 3.12 eval job timed out or ran out of memory.

[No output]
fervent grail
#

!e

result = ""
for i in range (5) :
    result += f"{i}, "
result = result[:-1]
print (result)
wise cargoBOT
#

@fervent grail :white_check_mark: Your 3.12 eval job has completed with return code 0.

0, 1, 2, 3, 4,
fervent grail
#

!e

result = ""
for i in range (5) :
    result += f"{i}, "
result = result[:-2]
print (result)
wise cargoBOT
#

@fervent grail :white_check_mark: Your 3.12 eval job has completed with return code 0.

0, 1, 2, 3, 4
somber heath
#

!e py v = 0 while v != 5: print(v) v += 1 if v == 2: break print('.')

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 0
002 | 1
003 | .
fervent grail
#

!e

result = ""
c = 0
whiel 5 > c :
    result += f"{c}, "
    c += 1
result = result[:-2]
print (result)
wise cargoBOT
#

@fervent grail :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 3
002 |     whiel 5 > c :
003 |           ^
004 | SyntaxError: invalid syntax
fervent grail
#

!e

result = ""
c = 0
while 5 > c :
    result += f"{c}, "
    c += 1
result = result[:-2]
print (result)
wise cargoBOT
#

@fervent grail :white_check_mark: Your 3.12 eval job has completed with return code 0.

0, 1, 2, 3, 4
fervent grail
#

!e

result = ""
c = 0
while 5 > c :
    result += f"{c}, "
    c += 1
    if c == 3 : break
result = result[:-2]
print (result)
wise cargoBOT
#

@fervent grail :white_check_mark: Your 3.12 eval job has completed with return code 0.

0, 1, 2
sour willow
#
 SyntaxWarning: invalid decimal literal
  print(tabulate([[10*i+j+1for j in range(10)] for i in range(10)], tablefmt="grid"))
#

anyone know how i can fix this?

#

oops wrong channel

sour willow
#

yeah got it thnx though

somber heath
#

Why would that only be a warning, though?

#

That's odd.

sour willow
#

it runs anyway

somber heath
#

!e py 1for

wise cargoBOT
#

@somber heath :x: Your 3.12 eval job has completed with return code 1.

001 | /home/main.py:1: SyntaxWarning: invalid decimal literal
002 |   1for
003 |   File "/home/main.py", line 1
004 |     1for
005 |      ^^^
006 | SyntaxError: invalid syntax
somber heath
#

Oh, okay.

sour willow
#

!e

print([[10*ifor j in range(1)]for i in range(2)])
wise cargoBOT
#

@sour willow :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     print([[10*ifor j in range(1)]for i in range(2)])
003 |             ^^^^^^^^^^^^^^^^^^^^^
004 | SyntaxError: invalid syntax. Perhaps you forgot a comma?
somber heath
#

Are you sure you mean ^ and not ** ?

sour willow
#

huh on 3.11.5 it runs

#

weird

wise cargoBOT
#
Missing required argument

code

sour willow
#

why would that be an arg if its only gonna support 3.12 lol

somber heath
#

I suspect there's a disparity between that description and what is actually implemented.

#

I may also have goofed the syntax of it.

vocal basin
#

did it get promoted to an error?

#

!e

[1for _ in []]
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | /home/main.py:1: SyntaxWarning: invalid decimal literal
002 |   [1for _ in []]
vocal basin
#

no, not yet

pulsar light
toxic arch
#

oh

#

nvm

#

i didnt see the except

somber heath
karmic obsidian
#

hey hi @glass atlas

somber heath
#

@glass atlas πŸ‘‹

glass atlas
#

Hello

somber heath
#

What's up?

#

Show me the method def block and the call.

#

!code

wise cargoBOT
#
Formatting code on discord

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.

For long code samples, you can use our pastebin.

somber heath
#

!voice

wise cargoBOT
#
Voice verification

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

glass atlas
#

Hello

somber heath
#
class MyClass:
    def __init__(self, ...):  # <-- Show me this.
        ...

MyClass(...)  # <-- Show me this.```
#

I don't do DM stuff.

#

Bar exceptions.

noble solstice
#

Hello Guys!

#

What r u guys discussing!

somber heath
#

Just the lines I indicated.

oblique ridge
pulsar light
#

i did it

somber heath
#

I need to see the class you're trying to use and the place where you're trying to create an instance of it.

oblique ridge
somber heath
#

That's part of the traceback.

oblique ridge
somber heath
#

Okay, and the instantiation call?

oblique ridge
#

ye this is from a site where all the problems are solvable. some of them are insanely tough, but many of the first problems are relatively easy

pulsar light
#

.... ok ill give it a try

somber heath
#

Show me what you're doing where you gopy Material(...)

pulsar light
#

@oblique ridge come vc

oblique ridge
#

also this isn't specific to this problem. you should test out your solutions on smaller sets you can confirm manually to see if what you wrote works in a reasonable time before doing it on a larger set like the thing the problem asks

oblique ridge
somber heath
#

@pulsar light πŸ‘‹

oblique ridge
#

absolutely, give it a go

pulsar light
oblique ridge
#

either of yall lmk if you need help

noble solstice
#

printing the ans or storing in a list?

oblique ridge
#

the final solution is one number. so you'd wanna print that to see what it is

#

if you create an account with the site, you're actually able to submit the answer you get to confirm. if you don't wanna do that, just ask me if your answer is right and i can confirm

noble solstice
#

we need to loop until num becomes 1 and apply odd even comdition?

pulsar light
#

u want the code?

#
#3n+1
import time

t= True
a = True



print('''   Hello there, this is a programme that you use to test some numbers in Collatz conjecture. 
      
        Incase you weren't familiar with it here is what it does:
      
            β€’ First, you type a positive number.
            β€’ If the number is even, you divide it by 2.
            β€’ If the number is odd, you multiply by 3 and add 1.
            β€’ The conjecture states that there is no number that wont end up in 1 if you applied this operations to it.
      
            You think you can find a number that can't satisfy this conjecture?. Goodluck!
      
                If you want to exit type 0.
      

      
      ''')

while t:
    n = int(input('Type a number :     '))
    if n ==0:
        print(' \n \n         Quit. \n \n')
        break
    print(n)
    while a:
        if n % 2 == 0:
                n //= 2
                print(n)
                time.sleep(0.1)
        else:
                n = 3*n + 1
                print(n)
                time.sleep(0.1)
        if n ==1:
            break
    ```
oblique ridge
#

ye if you send code it's nicer, but the important part is coming up with the solution

noble solstice
oblique ridge
#

oh did you solve? πŸ‘€

somber heath
#

!e ```py
class Person:
def init(self, name):
self.name = name
def greet(self):
print(f'Hello. I am {self.name}.')

peter = Person('Peter') # I want to see where you do something like this.
paul = Person('Paul')
peter.greet()
paul.greet()```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | Hello. I am Peter.
002 | Hello. I am Paul.
oblique ridge
#

you can solve this one slowly, but optimizing is the better fun

somber heath
#

!paste @rain salmon

wise cargoBOT
#
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.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

somber heath
#

Post all the code.

#

For the pastebin? How big is it?

#

Search for any mention of Material( in your code.

#

The traceback/error message might give you a clue as to the line it's snagging on.

noble solstice
somber heath
#

Right, so the Material class is asking to be provided with seven arguments in the call. The call is being given five arguments.

#

!e ```py
class MyClass:
def init(self, a, b, c, d, e, f, g):
print('Success')

MyClass(1, 2, 3, 4, 5, 6, 7)```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.

Success
somber heath
#

!e ```py
class MyClass:
def init(self, a, b, c, d, e, f, g):
print('Success')

MyClass(1, 2, 3, 4, 5)```

wise cargoBOT
#

@somber heath :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 5, in <module>
003 |     MyClass(1, 2, 3, 4, 5)
004 | TypeError: MyClass.__init__() missing 2 required positional arguments: 'f' and 'g'
noble solstice
#

@edgy viper ||104743|| Answer?

somber heath
#

@rain salmon This is essentially what your problem is.

oblique ridge
#
func main() {
    primes := utils.PrimeSieve(2_000_000)
    sum := utils.SumInts(primes)
    fmt.Println(sum)
}
```lol
pulsar light
somber heath
#

!e py 'abc' % 123

wise cargoBOT
#

@somber heath :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     'abc' % 123
004 |     ~~~~~~^~~~~
005 | TypeError: not all arguments converted during string formatting
somber heath
#

!e py 123 % 456

wise cargoBOT
#

@somber heath :warning: Your 3.12 eval job has completed with return code 0.

[No output]
oblique ridge
#

!e

print(3*'a')
wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

aaa
oblique ridge
#

!e ```py
print(3+'a')

wise cargoBOT
#

@oblique ridge :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     print(3+'a')
004 |           ~^~~~
005 | TypeError: unsupported operand type(s) for +: 'int' and 'str'
coarse rock
#

im bad at math 😭

obsidian dragon
#
def is_prime(num):
    if num <= 1:
        return False
    if num <= 3:
        return True
    if num % 2 == 0 or num % 3 == 0:
        return False
    i = 5
    while i * i <= num:
        if num % i == 0 or num % (i + 2) == 0:
            return False
        i += 6
    return True

def find_primes(n):
    prime_list = []
    num = 2  # Start with the first prime number

    while len(prime_list) < n:
        if is_prime(num):
            prime_list.append(num)
        num += 1

    return prime_list

# Example usage:
n = 10  # Change this to the number of prime numbers you want
prime_numbers = find_primes(n)
print(prime_numbers)
somber heath
#

!e ```py
def add(a, b):
return a + b

print(add(5, 4))
print(add(3, 2))
print(add(2))```

wise cargoBOT
#

@somber heath :x: Your 3.12 eval job has completed with return code 1.

001 | 9
002 | 5
003 | Traceback (most recent call last):
004 |   File "/home/main.py", line 6, in <module>
005 |     print(add(2))
006 |           ^^^^^^
007 | TypeError: add() missing 1 required positional argument: 'b'
obsidian dragon
#

!e

def is_prime(num):
    if num <= 1:
        return False
    if num <= 3:
        return True
    if num % 2 == 0 or num % 3 == 0:
        return False
    i = 5
    while i * i <= num:
        if num % i == 0 or num % (i + 2) == 0:
            return False
        i += 6
    return True

def find_primes(n):
    prime_list = []
    num = 2  # Start with the first prime number

    while len(prime_list) < n:
        if is_prime(num):
            prime_list.append(num)
        num += 1

    return prime_list

# Example usage:
n = 10  # Change this to the number of prime numbers you want
prime_numbers = find_primes(n)
print(prime_numbers)
wise cargoBOT
#

@obsidian dragon :white_check_mark: Your 3.12 eval job has completed with return code 0.

[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
coarse rock
dry jasper
obsidian dragon
#

!e

def is_prime(num):
    if num <= 1:
        return False
    if num <= 3:
        return True
    if num % 2 == 0 or num % 3 == 0:
        return False
    i = 5
    while i * i <= num:
        if num % i == 0 or num % (i + 2) == 0:
            return False
        i += 6
    return True

def find_primes(n):
    prime_list = []
    num = 2  # Start with the first prime number

    while len(prime_list) < n:
        if is_prime(num):
            prime_list.append(num)
        num += 1

    return prime_list

# Example usage:
n = 10000  # Change this to the number of prime numbers you want
prime_numbers = find_primes(n)
print(prime_numbers)
wise cargoBOT
#

@obsidian dragon :white_check_mark: Your 3.12 eval job has completed with return code 0.

[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 12
... (truncated - too long)

Full output: https://paste.pythondiscord.com/FYOWLKQASGH5LKF73QTOFRDSWM

oblique ridge
#

!e ```py
def is_prime(n: int) -> bool:
if n < 2:
return False
for i in range(2, int(n ** .5) + 1):
if n % i == 0:
return False
return True

prime = 0
i = 2
while prime < 10_0001:
if is_prime(i):
prime += 1
print(i)
i += 1

wise cargoBOT
#

Sorry, an unexpected error occurred. Please let us know!

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

oblique ridge
#

!e ```py
def is_prime(n: int) -> bool:
if n < 2:
return False
for i in range(2, int(n ** .5) + 1):
if n % i == 0:
return False
return True

prime = 0
i = 2
while prime < 10_0001:
if is_prime(i):
prime += 1
print(i)
i += 1

wise cargoBOT
#

@oblique ridge :x: Your 3.12 eval job timed out or ran out of memory.

001 | 2
002 | 3
003 | 5
004 | 7
005 | 11
006 | 13
007 | 17
008 | 19
009 | 23
010 | 29
011 | 31
... (truncated - too many lines)

Full output: unable to upload

pulsar light
oblique ridge
#

i'm stupid

#

!e ```py
def is_prime(n: int) -> bool:
if n < 2:
return False
for i in range(2, int(n ** .5) + 1):
if n % i == 0:
return False
return True

prime = 0
i = 2
while prime < 10_001:
if is_prime(i):
prime += 1
print(i)
i += 1

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 2
002 | 3
003 | 5
004 | 7
005 | 11
006 | 13
007 | 17
008 | 19
009 | 23
010 | 29
011 | 31
... (truncated - too many lines)

Full output: unable to upload

obsidian dragon
#

!e

def is_perfect_number(n):
    divisors = [1]
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            divisors.extend([i, n // i])
    return sum(divisors) == n

def find_perfect_numbers_in_range(start, end):
    perfect_numbers = []
    for number in range(start, end + 1):
        if is_perfect_number(number):
            perfect_numbers.append(number)
    return perfect_numbers

start_range = 1  # Define your start range here
end_range = 1000000  # Define your end range here

perfect_numbers_in_range = find_perfect_numbers_in_range(start_range, end_range)
print("Perfect numbers in the range [{}, {}]: ".format(start_range, end_range))
print(perfect_numbers_in_range)
wise cargoBOT
#

@obsidian dragon :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | Perfect numbers in the range [1, 10000]: 
002 | [1, 6, 28, 496, 8128]
pulsar light
#

#prime

'''
can we use the mod != 0 and lets say 'n' is the prime num before it ,so if p % n,n-1,n-2,...,3,2 and also lets use the reverse and the list[1:]
'''

wise cargoBOT
#

@obsidian dragon :warning: Your 3.12 eval job timed out or ran out of memory.

[No output]
pulsar light
#
#prime 

'''
can we use the mod != 0 and lets say 'n' is the prime num before it ,so if p % n,n-1,n-2,...,3,2 and also lets use the reverse and the list[1:]
'''

haughty fog
#

!e
print('Hello, S-lang is better')

wise cargoBOT
#

@haughty fog :white_check_mark: Your 3.12 eval job has completed with return code 0.

Hello, S-lang is better
coarse rock
#

!code

wise cargoBOT
#
Formatting code on discord

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.

For long code samples, you can use our pastebin.

coarse rock
#
i = 5
y = 1
prime = 0
for x in range(1, i):
    if i % x == 0:
        prime += 1

if prime > 1:
    print(i, " not prime")

else:
    print(i, " is prime")

somber heath
#

Watch the tutorial series I wrote down when you've recovered.

#

It'll get you situated.

oblique ridge
#

!e ```py
i = 5
y = 1
prime = 0
for x in range(1, i):
if i % x == 0:
prime += 1

if prime > 1:
print(i, " not prime")

else:
print(i, " is prime")

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

5  is prime
whole bear
#

mods could I stream please

rugged root
#

!stream 939196353362419722

wise cargoBOT
#

βœ… @whole bear can now stream until <t:1697207489:f>.

whole bear
#

thank you

#

im impressed by large ones, but i cant grow one

#

theyre itchy

rugged root
#

Exactly

rugged root
#

Hey Focus

somber heath
#

@grave hollow πŸ‘‹

rugged root
somber heath
#

@proper sparrow πŸ‘‹

whole bear
#

pants gpt

#

btw the language is my own prog lang

rugged root
whole bear
#

i have a oled display

somber heath
#

OLED or OILED? You decide!

whole bear
#

i am oiled

somber heath
#

Human Oil sounds like a product out of Rick and Morty.

oblique ridge
rugged root
rugged root
#

@somber heath Huh

#

Wonder if my hero picked these up at the same time

wise loom
#

@amber raptor have you had any water 🚰 today?

rugged root
#

Interestingly, looking at custom router firmware, there aren't many for ones that have 802.11ax or Wifi 6

alpine crow
rugged root
#

I don't want to put a custom on it, just interesting

alpine crow
still shell
#

thats crazy

gentle flint
rugged root
#

HA

#

Yeah it does

alpine crow
#

when chatgpt takes over hemlocks spider router

dry jasper
#

@gentle flint are you in the VC later?

whole bear
#

i think they just told you to do their job

#

as an take home

oblique ridge
whole bear
#

the thing is, if its a good challenge, id do it

toxic arch
#

guyss

#

do you like my gui?

#

thx Yoon

oblique ridge
toxic arch
#

its not done yet though

gentle flint
#

won't be later

oblique ridge
#

i can tell you it's a million times better than a UI i'd make

toxic arch
#

the red square is for a preview

#

of the file

#

@mild quartz what that code for

coarse rock
rugged root
#

@midnight temple Yo

midnight temple
turbid sandal
#

I brought a knife to school

#

and thretend a kid to give me back my adhd noodle

hallow charm
#

im just checking if my headset works guys dw

coarse rock
#

three more word

#

then i can

#

talk

rugged root
dry jasper
cobalt cloak
rugged root
#

Divide the number by 2. If the result is a whole number, the number is not prime.
Divide the number by prime numbers, such as 3, 5, 7, and 11. If the number is divisible by any of these numbers, it is not prime.
Find the biggest perfect square less than or equal to the number.
Write out all the primes less than or equal to the perfect square.
Test if the number is divisible by each of the primes on your list. If the number is divisible by any of the primes, it is not prime.

#

Hmm

#

John Harvey Kellogg (February 26, 1852 – December 14, 1943) was an American businessman, inventor, physician, and advocate of the Progressive Movement. He was the director of the Battle Creek Sanitarium in Battle Creek, Michigan, founded by members of the Seventh-day Adventist Church. It combined aspects of a European spa, a hydrotherapy instit...

#

This guy was really interesting. And I was right, it was his brother that invented breakfast cereal corn flakes

short owl
#

there is a movie about this ...

#

from prime numbers to old fart jokes .... its my first coffee

molten pewter
short owl
#

no jokes allowed in the MATH room ..... but here is ok

rugged root
#

@craggy mirage You have music coming through your mic

#

You aware of this?

craggy mirage
#

I was playing the piano

#

for the vc

rugged root
#

Yeah don't please

craggy mirage
#

I'm sorry

rugged root
#

It's disruptive

craggy mirage
#

πŸ™πŸΎ

rugged root
#

Thanks

#

Joseph Pujol (June 1, 1857 – August 8, 1945), better known by his stage name Le PΓ©tomane (, French pronunciation: [lΙ™petΙ”man]), was a French flatulist (professional farter) and entertainer. He was famous for his remarkable control of the abdominal muscles, which enabled him to seemingly fart at will. His stage name combines the French verb pΓ©ter...

coarse rock
#

so if the factor is more than 2, then its not prime

rugged root
#

Right that I get

dry jasper
short owl
coarse rock
#

hmm you could do that

short owl
#

what have you started

oblique ridge
#
i = 3
is_prime = True
for x in range(2, i):
    if i % x == 0:
        is_prime = False 
short owl
#

i think a religion has started from less

obsidian dragon
#

are we still on this? what is the goal of the code?

oblique ridge
whole bear
oblique ridge
#

instead of checking all the way up to 1 less than i, you can check up to the square root of i

short owl
#

renn and stimpy -- logs...

oblique ridge
#

because if a number has a factor, it's got 2

short owl
#

mental subversion

oblique ridge
#

so 15 is divisible by 3 and 5
and those are just above and below sqrt(15)

sour willow
#

sup prop, hem, potato, magic

oblique ridge
#

so ```py
i = 3
is_prime = True
for x in range(2, int(i**.5) + 1):
if i % x == 0:
is_prime = False

coarse rock
#

if the number is 4

#

ohhhww

oblique ridge
#
def is_prime(n: int) -> bool:
    if n < 2:
        return False
    for i in range(2, int(n ** .5) + 1):
        if n % i == 0:
            return False
    return True
coarse rock
#

the sqrt of 4 is two right

#

then two is a prime

short owl
#

would you call what your discussing , numerical analysis ?

coarse rock
#

sameeeee

short owl
#

tortoise and hare -- how about xerces ( zerk see ) problem of the messenger

coarse rock
#

Gojo's power

wise cargoBOT
#

math.isqrt(n)```
Return the integer square root of the nonnegative integer *n*. This is the floor of the exact square root of *n*, or equivalently the greatest integer *a* such that *a*Β² ≀ *n*.

For some applications, it may be more convenient to have the least integer *a* such that *n* ≀ *a*Β², or in other words the ceiling of the exact square root of *n*. For positive *n*, this can be computed using `a = 1 + isqrt(n - 1)`.

New in version 3.8.
oblique ridge
#

didnt feel like importing math 😩

ionic flicker
#

good morning guys

vocal basin
#

int(n ** .5) gets quite wrong with large numbers

#

... though at that point you wouldn't be exhaustively checking divisors

#

(hopefully)

short owl
#

Xerxes

#

who was the tall guy in the movie 300

#

duck search --- i had to learn how to spell it

coarse rock
#

do you know that turtle can breath from ze ass

#

bye

molten pewter
#

-.+0

rugged root
#

Because of course I do

#

Why do I know these things

short owl
#

In computing, the Two Generals' Problem is a thought experiment meant to illustrate the pitfalls and design challenges of attempting to coordinate an action by communicating over an unreliable link. In the experiment, two generals are only able to communicate with one another by sending a messenger through enemy territory. The experiment asks ho...

#

this a old one --- but i cant find the xerces one - maybe its called something else

#

room died - was it the turtle fart...

#

i just realized turtles and politicians have something in common...

pulsar light
#

imoport sevseg

turbid sandal
#

print(1)

pulsar light
#

py -m pip install "sevseg"

oblique ridge
pulsar light
#

{

turbid sandal
#

!paste

wise cargoBOT
#
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.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

pulsar light
#

Al Sweigart - The Big Book of Small Python Projects_ 81 Easy Practice Programs (2021, No Starch Press) -

turbid sandal
oblique ridge
#

!e ```py
representations = {
'0': ('###', '# #', '# #', '# #', '###'),
'1': (' #', ' #', ' #', ' #', ' #'),
'2': ('###', ' #', '###', '# ', '###'),
'3': ('###', ' #', '###', ' #', '###'),
'4': ('# #', '# #', '###', ' #', ' #'),
'5': ('###', '# ', '###', ' #', '###'),
'6': ('###', '# ', '###', '# #', '###'),
'7': ('###', ' #', ' #', ' #', ' #'),
'8': ('###', '# #', '###', '# #', '###'),
'9': ('###', '# #', '###', ' #', '###'),
'.': (' ', ' ', ' ', ' ', ' #'),
}

def seven_segment(number):
# treat the number as a string, since that makes it easier to deal with
# on a digit-by-digit basis
digits = [representations[digit] for digit in str(number)]
# now digits is a list of 5-tuples, each representing a digit in the given number
# We'll print the first lines of each digit, the second lines of each digit, etc.
for i in range(5):
print(" ".join(segment[i] for segment in digits))

seven_segment(420.69)

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | # #  ###  ###       ###  ###
002 | # #    #  # #       #    # #
003 | ###  ###  # #       ###  ###
004 |   #  #    # #       # #    #
005 |   #  ###  ###    #  ###  ###
turbid sandal
#

# ### ### ###

# # # # # #

### # # ###

# # # # #

### ### # ###

oblique ridge
#
# #  ###  ###       ###  ###
# #    #  # #       #    # #
###  ###  # #       ###  ###
  #  #    # #       # #    #
  #  ###  ###    #  ###  ###
rugged root
pulsar light
#

exactly i said that too

oblique ridge
#

definitely beats this

rugged root
#

Oh god

short owl
#

hes right

oblique ridge
#

!e ```py
from datetime import datetime
now = datetime.now()
print(now)

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

2023-10-13 17:43:01.811866
pulsar light
#

informatics

oblique ridge
#

!e

from datetime import timedelta
countdown = timedelta(seconds=10)
while countdown >= timedelta(seconds=0):
    countdown -= timedelta(seconds=1)
    print(countdown)
wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 0:00:09
002 | 0:00:08
003 | 0:00:07
004 | 0:00:06
005 | 0:00:05
006 | 0:00:04
007 | 0:00:03
008 | 0:00:02
009 | 0:00:01
010 | 0:00:00
011 | -1 day, 23:59:59
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/EHUHVLBWYZVDCJAPTWKVEZT5VE

oblique ridge
oblique ridge
# oblique ridge !e ```py representations = { '0': ('###', '# #', '# #', '# #', '###'), '...

!e

seven_segment = lambda number: print(*["  ".join(segment[i] for segment in [{'0': ('###', '# #', '# #', '# #', '###'),'1': ('  #', '  #', '  #', '  #', '  #'),'2': ('###', '  #', '###', '#  ', '###'),'3': ('###', '  #', '###', '  #', '###'),'4': ('# #', '# #', '###', '  #', '  #'),'5': ('###', '#  ', '###', '  #', '###'),'6': ('###', '#  ', '###', '# #', '###'),'7': ('###', '  #', '  #', '  #', '  #'),'8': ('###', '# #', '###', '# #', '###'),'9': ('###', '# #', '###', '  #', '###'),'.': ('   ', '   ', '   ', '   ', '  #')}[digit] for digit in str(number)]) for i in range(5)], sep="\n")

seven_segment(420.69)
wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | # #  ###  ###       ###  ###
002 | # #    #  # #       #    # #
003 | ###  ###  # #       ###  ###
004 |   #  #    # #       # #    #
005 |   #  ###  ###    #  ###  ###
oblique ridge
#
def foo(bar):
    return bar * bar
# is equal to
foo = lambda bar: bar * bar
#

!e ```py
def square(a):
return a ** 2
nums = [1, 2, 3, 4, 5]
print(*map(square, nums))

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

1 4 9 16 25
novel tangle
oblique ridge
#

!e ```py
nums = [1, 2, 3, 4, 5]
print(*map(lambda a: a ** 2, nums))

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

1 4 9 16 25
toxic arch
#

iterable has

#

__next__

#

in it

#

method

#

@oblique ridge how did you get that other role

#

advent of code

#

can you give me stream permissions?

oblique ridge
#

string.upper()

#

upper is a method

#

str.__next__()

#

for i in str:

#

i = next(str)

#
def next(foo):
    return foo.__next__()
toxic arch
#

btw

#

can i get stream

#

perimssions

pulsar light
#

str.next()
for i in str:
i = next(str)

#

def next(foo):
return foo.next()

oblique ridge
toxic arch
#

!e

class Hello:
    def __init__(self):
        self.i = 1
    def __next__(self):
        self.i += 1
        if self.i == 4:
            raise StopIteration()
        return self.i

for i in Hello:
 print(i)
wise cargoBOT
#

@toxic arch :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 10, in <module>
003 |     for i in Hello:
004 | TypeError: 'type' object is not iterable
toxic arch
#

!e

wise cargoBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

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

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

Currently only 3.12 version is supported.

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

toxic arch
#

!e

class Hello:
    def __init__(self):
        self.i = 1
    def __iter__ (self):
        return self
    def __next__(self):
        self.i += 1
        if self.i == 4:
            raise StopIteration()
        return self.i

for i in Hello():
 print(i)
wise cargoBOT
#

@toxic arch :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 10, in <module>
003 |     for i in Hello():
004 | TypeError: 'Hello' object is not iterable
toxic arch
#

sad

#

!e

class Hello:
    def __init__(self):
        self.i = 1
    def __iter__ (self):
        return self
    def __next__(self):
        self.i += 1
        if self.i == 4:
            raise StopIteration()
        return self.i

for i in Hello():
 print(i)
wise cargoBOT
#

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

001 | 2
002 | 3
shrewd olive
#

!e

print(True > True < False)
wise cargoBOT
#

@shrewd olive :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     print(true > true < false)
004 |           ^^^^
005 | NameError: name 'true' is not defined. Did you mean: 'True'?
shrewd olive
#

!e

print(True > True < False)
wise cargoBOT
#

@shrewd olive :white_check_mark: Your 3.12 eval job has completed with return code 0.

False
toxic arch
#

!e
print(True >= True < False)

wise cargoBOT
#

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

False
toxic arch
#

!e
print(True <= True < False)

wise cargoBOT
#

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

False
toxic arch
#

!e
print(True >= True > False)

wise cargoBOT
#

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

True
shrewd olive
#

!e

print(True == True > False)
wise cargoBOT
#

@shrewd olive :white_check_mark: Your 3.12 eval job has completed with return code 0.

True
somber heath
#

@sage cape πŸ‘‹

sage cape
#

hEY

#

I cant talk

somber heath
#

!voice

wise cargoBOT
#
Voice verification

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

sage cape
#

but I need help with a quick thing in Python

#

so can we do a private call?

#

I need help with moving a file from my downloads to my user directory

boreal abyss
#

oh

#

you can talk here

#

that's neat

#

gm guys!

sage cape
#

So

#

here is the error message Im getting

#

can we just do a private call I gotta talk

boreal abyss
somber heath
#

pathlib, shutil

#

What's your error?

boreal abyss
#
import shutil
import os

# Define the source and destination directories
source_directory = 'source_folder'
destination_directory = 'destination_folder'

# List the files in the source directory
files = os.listdir(source_directory)

# Iterate through the files and move them to the destination directory
for file in files:
    source_path = os.path.join(source_directory, file)
    destination_path = os.path.join(destination_directory, file)

    try:
        shutil.move(source_path, destination_path)
        print(f"Moved {file} to {destination_directory}")
    except Exception as e:
        print(f"Failed to move {file}: {str(e)}")
#

via chatgpt

#

non?

somber heath
#

!rule 10

wise cargoBOT
#

10. Do not copy and paste answers from ChatGPT or similar AI tools.

boreal abyss
#

ah

sage cape
#

So this is it

#

What am I doing wrong here?

boreal abyss
sage cape
#

I have a FIT file and I am trying to move it to my designated user directory

boreal abyss
#

you should use arch linux gentoo

somber heath
#

!d pathlib

wise cargoBOT
#

New in version 3.4.

Source code: Lib/pathlib.py

This module offers classes representing filesystem paths with semantics appropriate for different operating systems. Path classes are divided between pure paths, which provide purely computational operations without I/O, and concrete paths, which inherit from pure paths but also provide I/O operations.

../_images/pathlib-inheritance.png If you’ve never used this module before or just aren’t sure which class is right for your task, Path is most likely what you need. It instantiates a concrete path for the platform the code is running on.

Pure paths are useful in some special cases; for example:

somber heath
#

!d shutil

wise cargoBOT
#

Source code: Lib/shutil.py

The shutil module offers a number of high-level operations on files and collections of files. In particular, functions are provided which support file copying and removal. For operations on individual files, see also the os module.

Warning

Even the higher-level file copying functions (shutil.copy(), shutil.copy2()) cannot copy all file metadata.

On POSIX platforms, this means that file owner and group are lost as well as ACLs. On Mac OS, the resource fork and other metadata are not used. This means that resources will be lost and file type and creator codes will not be correct. On Windows, file owners, ACLs and alternate data streams are not copied.

somber heath
#

!d open

wise cargoBOT
#

open(file, mode='r', buffering=- 1, encoding=None, errors=None, newline=None, closefd=True, opener=None)```
Open *file* and return a corresponding [file object](https://docs.python.org/3/glossary.html#term-file-object). If the file cannot be opened, an [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError) is raised. See [Reading and Writing Files](https://docs.python.org/3/tutorial/inputoutput.html#tut-files) for more examples of how to use this function.

*file* is a [path-like object](https://docs.python.org/3/glossary.html#term-path-like-object) giving the pathname (absolute or relative to the current working directory) of the file to be opened or an integer file descriptor of the file to be wrapped. (If a file descriptor is given, it is closed when the returned I/O object is closed unless *closefd* is set to `False`.)
sage cape
#

also wtf am i doing wrong here

#

I dont understand any of this

#

all I want is to extract data from a FIT file but it isn't doing it's job

vocal basin
#

\' at the end

#

that causes errors sometimes, afaik

#

!e

r'a\'
wise cargoBOT
#

@vocal basin :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     r'a\'
003 |     ^
004 | SyntaxError: unterminated string literal (detected at line 1)
vocal basin
#

!e

print(r'a\\')
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

a\\
vocal basin
#

there isn't a way around

sage cape
#

Well

vocal basin
#

!e

print(r'a\
')
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

a\
vocal basin
#

neither does this work

#

use pathlib

sage cape
#

can anyone of u dm me and accept my friend request

#

I gotta stream this

#

😦

vocal basin
#
>>> Path("C:\\Users\\User\\")
WindowsPath('C:/Users/User')
>>> Path("C:/Users/User/")
WindowsPath('C:/Users/User')
#

!d pathlib.Path

wise cargoBOT
#

class pathlib.Path(*pathsegments)```
A subclass of [`PurePath`](https://docs.python.org/3/library/pathlib.html#pathlib.PurePath), this class represents concrete paths of the system’s path flavour (instantiating it creates either a [`PosixPath`](https://docs.python.org/3/library/pathlib.html#pathlib.PosixPath) or a [`WindowsPath`](https://docs.python.org/3/library/pathlib.html#pathlib.WindowsPath)):

```py
>>> Path('setup.py')
PosixPath('setup.py')
```  *pathsegments* is specified similarly to [`PurePath`](https://docs.python.org/3/library/pathlib.html#pathlib.PurePath).
sage cape
#

But none of my friends used any of this

vocal basin
#

it even has an open method