[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: dhnb.png (69 KB, 282x179)
69 KB
69 KB PNG
Python is supposed to be easier to learn and faster to develop in compared to other languages. But it's annoying when you need to do something simple, like loading a file line by line unless a line starts with ">", and you "should" use
> line.startswith(">")
rather than
> line[0] != ">"
what is this jeetcoder mess.
>>
>>101565128
> supposed to be easier to learn
It is easier to learn the meaning of "starts with" than to understand the arcane string-index access spell. Sure, for someone who already knows how to program the latter is easy, but if you're new to this — plain English beats everything else.
Also, what does the "first element of a unicode string" mean? If you don't see a problem here, you are not as experienced as you think.
>>
>>101565128
That's how I look
>>
File: 1717958650357.jpg (59 KB, 1080x1000)
59 KB
59 KB JPG
personally i find it great for simple things like <100 line scripts but amazingly cancer for large and complex things because of dynamic typing and shit performance. i also find it annoying that people cope about its perf - "its fast enough" yes if you are making a toy crud blog app or are making a few http requests its fine.
>>
>>101565173
I'm not working with emojis or chinese characters. Only A-Z, a-z, 0-9, \n, and > . : ; -
I wish more non CS STEMtards would use Fortran or C, but I'm stuck with python, because everyone else uses it. To the point where the main libraries field specific libraries are written in pure python
>>
>>101565128
You dumb nigger. Blackest gorilla nigger on the board. startswith will work for multicharacter strings while indexing won't.
>>101565198
>won't even allow non-chads to be their uber driver
Grim for us.
>>
>>101565128
where the fuck does it say you "should" use the first option? python can treat a string as a list without issue, never even heard of startswith but I guess it's there for spergs like you who can't understand how to code



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.