Write a program which reads a string using input(), and outputs the same string but with the first and last character exchanged. (You may assume the input string has length at least 2.) For example, on input Fairy a correct program will print yairF.
how come it's word[1:len(word)-1] and not word[1:len(word)-2]
index: 0 1 2 3
char: w o r d
you can't use just len(word) because then you get 4 for the final character instead of 3
I guess the range thing is not inclusive of the last index number specified?
so S[0:4] will give you 0, 1, 2, and 3 but not 4?
this is a question about how array indices are handed and it's language specific
some start with 0 as the first index and some start with 1
it seems like to me that word[1:len(word)-2] should be correct but possibly the language you're using uses a non-inclusive final index in a range? it seems squirrelly to me
So that's what the first 35 seconds of a Vampire Weekend song sounds like
+1
Options
KageraImitating the worst people. Since 2004Registered Userregular
I mean I've seen a vendor at work that for some reason insists on wearing a shirt where his gut flap constantly hangs out. And I'm like if that were me I would get the extra tall shirts because that's kinda unappealing.
I had a professor today make a crack about how casinos are the white man's revenge for what was done to the Indian tribes. Smile, laugh.
Some poor girl, and I don't mean this with snark or anything like that, really just kind of shut down and lost the ability to speak words or think clearly for a bit.
was she confused at his meaning, or just awestruck that a professor would be cracking genocide jokes?
The second.
I made a game! Hotline Maui. Requires mouse and keyboard.
0
Options
Irond WillWARNING: NO HURTFUL COMMENTS, PLEASE!!!!!Cambridge. MAModeratormod
There's no good way to take that when your mom was a fruit picker.
It's fine, they were lower class so obviously worse people. They should have cared more about profits and social norms if they wanted to be remembered well. Maybe they coulda even pulled themselves up by their bootstraps!
ugh
my grandparents were in a lot of ways really dignified and admirable people
Write a program which reads a string using input(), and outputs the same string but with the first and last character exchanged. (You may assume the input string has length at least 2.) For example, on input Fairy a correct program will print yairF.
how come it's word[1:len(word)-1] and not word[1:len(word)-2]
index: 0 1 2 3
char: w o r d
you can't use just len(word) because then you get 4 for the final character instead of 3
I guess the range thing is not inclusive of the last index number specified?
so S[0:4] will give you 0, 1, 2, and 3 but not 4?
this is a question about how array indices are handed and it's language specific
some start with 0 as the first index and some start with 1
it seems like to me that word[1:len(word)-2] should be correct but possibly the language you're using uses a non-inclusive final index in a range? it seems squirrelly to me
oh, okay
*googles python index ranges*
0
Options
Sir Landsharkresting shark faceRegistered Userregular
CAN YOU BITCHES NOT READ??? MOTHERFUCKING LAVA!!
NO ONE CARES WHAT SUIT YOU'RE WEARING WHEN YOUR FEET HAVE BURNED OFF TO THE ANKLES BECAUSE YOU WERE TOO BUSY JIBBY JABBERING ON THE INTERNET TO FORMULATE A PROPER EVACUATION PLAN
Please consider the environment before printing this post.
My grandfather on my dad's side did wear a suit every day.
He sold them as well.
His father was a tailor.
So not so much blue collar as my mom's side.
But I am on board with the difference in clothing is as much about availability and just fashion trends then some need to dress in a suit or suit like clothing.
NO ONE CARES WHAT SUIT YOU'RE WEARING WHEN YOUR FEET HAVE BURNED OFF TO THE ANKLES BECAUSE YOU WERE TOO BUSY JIBBY JABBERING ON THE INTERNET TO FORMULATE A PROPER EVACUATION PLAN
as half djinn half jawa born under the twin sons of tatooine with heirloom +5 brimstone firebrand karyt dragon pearl rings I have a natural immunity to lava
Bless your heart.
+2
Options
ElldrenIs a woman dammitceterum censeoRegistered Userregular
I'm not sure the premise of "the great failure of STEM to appeal to women everywhere" is not a fallacious one.
This was so hedged that it took an extra few seconds to parse.
I don't know, my career-engineer father and most of his co-workers that I've ever met tend to make a decent - granted anecdotal - case that the field is drastically hostile to women and minorities.
Few things they seem to love as much as sitting around complaining about how unfair life is for the white men who have to deal with anything resembling affirmative action.
well, sure, but there are also lots of women engineers and doctors and scientists
not as many as there would be if the culture weren't so cro-magnon, i'll grant
but I don't think a female host on a science program is the way we're going to solve that problem
engineering is significantly more hostile than medicine
Medicine is full of women, it just suffers from the broader societal issues quite visibly
On the one hand it is nice to recline on this couch with dags sleeping around me. On the other I inevitably end up lying in a position that makes my balls hurt.
but looking at photographs of people at work at factories or poor people out on the town you don't really see a great deal of difference between the way poor people dressed and the way rich people dressed - it tended to be button-up shirts jackets, vests, hats, sometimes ties, etc. i mean clearly the rich people had finer, fancier clothes, but the actual structure of dress was real similar.
at some point between the 20s and 60s this proletarian ethic that poor people should dress in solidarity with their social class sort of spread and created the views we have today.
Sure.
I'd argue it was WWII, basically.
Cloth rationing provided a disincentive to wear things like vests and ties. Even items that weren't directly rationed (like hats) became more expensive. That's the point at which vests and ties became class signifiers.
Meanwhile photos were filtering back in to the US of off-duty GIs in barracks sitting around in white t-shirts. I think that cemented a cultural stereotype of the rugged casual-wear American hero, which led to Marlon Brando and James Dean rocking the jeans-and-t-shirt look in movies.
every person who doesn't like an acquired taste always seems to think everyone who likes it is faking it. it should be an official fallacy.
CorehealerThe ApothecaryThe softer edge of the universe.Registered Userregular
I associate suits with two things.
Funerals, which have been the majority of times I have ever worn one myself, and my father, because he wears them all the time to work and most social events.
There is a lot of emotional baggage I associate with suits as a result that, while not preventing me from actively wearing them, does make me feel profoundly uncomfortable in them.
ZampanovYou May Not Go HomeUntil Tonight Has Been MagicalRegistered Userregular
from that sample, Vampire Weekend seems like a band that I could be okay with if used properly in a movie or tv soundtrack, but not a thing I would listen to outside of that type of context
NO ONE CARES WHAT SUIT YOU'RE WEARING WHEN YOUR FEET HAVE BURNED OFF TO THE ANKLES BECAUSE YOU WERE TOO BUSY JIBBY JABBERING ON THE INTERNET TO FORMULATE A PROPER EVACUATION PLAN
you jump from the couch to the coffee table, obvs, then use the couch cushions as stepping stones until you get to a lava-free zone
NO ONE CARES WHAT SUIT YOU'RE WEARING WHEN YOUR FEET HAVE BURNED OFF TO THE ANKLES BECAUSE YOU WERE TOO BUSY JIBBY JABBERING ON THE INTERNET TO FORMULATE A PROPER EVACUATION PLAN
you jump from the couch to the coffee table, obvs, then use the couch cushions as stepping stones until you get to a lava-free zone
management material right here
Please consider the environment before printing this post.
+3
Options
CorehealerThe ApothecaryThe softer edge of the universe.Registered Userregular
Never knock looking good for an interview or whatnot, but I'll always take going casual/business casual to wearing overly formal anything when I can.
To that end I propose future clothes be a hybrid of present day clothes and Mass Effect clothes.
0
Options
Irond WillWARNING: NO HURTFUL COMMENTS, PLEASE!!!!!Cambridge. MAModeratormod
business C is composed of individuals who refuse to be stifled and feel like things should be done their way -- these design guidelines are terrible i'm just going to make my part the way that it should be done. this policy doesn't make sense to me; i'm just going to ignore it. my boss wants me to work on project A but honestly i am way better suited and more interested on project B so that is what i am going to do.
I have to say, Will, a lot of what you're saying seems motivated by a hardcore hate boner for fucking disreputable hippies. It's like you're fighting a culture war out of time. Which is fine, I guess, I mean I'm still siding with the Communists, if we want to compare who's tilting at older windmills. But I grew up in what is by all lights about as hippy an environment as they come (the lovely Ojai, California, known for its moon cults). And despite its various excesses--let's not get into the state of the science education provided by people who sincerely believe in healing crystals--I think that in terms of its values it was great.
I mean, here's an opposing anecdote. Recently I was playing 7 wonders with a bunch of people. Normally when we play we just add up our scores by ourselves at the end. But the dude who brought the game, this time, absolutely insisted that instead of doing that we all use the little score sheet that came with the game. It took about four times as long, and involved us all awkwardly sitting around reading out sub-portions of our score (7 points from red...) while he scribbled them down. It was So. Dumb. But he had to do it! Because--there was a sheet! That's what it was for. What--were we just going to not use the sheet?
He had a similar fit when some people wanted to trade in their wonders for new ones they hadn't tried before. He was like: oh, well they're supposed to be random. It's only the rules.
Yeah, well sometimes the rules are dumb, and we can think about what works for or against people instead.
i mean i am not championing all rules for their own sake
but i do think the modern american ethic of radical individualism is harmful. i'm not a communist but i do believe in communitarianism - we all exist in society and need to understand and be mindful of who we are from the perspectives of other people and our various society as a whole.
we need to be a good son and a good brother and a good neighbor and a good colleague and a good citizen.
and part of that means that we follow social rules that we didn't independently invent sometimes. we don't pick our noses at the table and we don't spit on the street and we take off our hats indoors and we say please and thank you and we shower at least once a week and we don't wear our larp gear to a funeral.
and maybe it feels like i'm some kind of 1960s square revanchist, but i don't think that the continuing lessons of the hippie movement has really done our culture any favors
+1
Options
21stCenturyCall me Pixel, or Pix for short![They/Them]Registered Userregular
Also I find the dress wear conversation in the US is very regionalized.
The South West has a different style of work clothing compared to Southern Cali compared to Northern Cali compared to the Northeast and so on.
Some of it is due to weather. If it is 75F and sunny 80% of the year it makes less sense to wear wool suits all the time but more casual and light clothing is more practical. While if it is cool and rainy a wool suit is more functional. Then you get a conservative dress culture verse more liberal dress culture and the influence of office politics and culture. A non-profit will be more relaxed compare to a government office or a wall street trader's office.
+2
Options
Irond WillWARNING: NO HURTFUL COMMENTS, PLEASE!!!!!Cambridge. MAModeratormod
I don't see why younger people should be the ones that have to change.
Maybe the older generation should stop pussyfooting around and judge people on their merits for the work at hand rather than their ability to dress for an interview/work?
lol
the point is that you need to know how to engage the world on its own terms rather than demand the world engage you on your own terms.
I'm not sure the premise of "the great failure of STEM to appeal to women everywhere" is not a fallacious one.
This was so hedged that it took an extra few seconds to parse.
I don't know, my career-engineer father and most of his co-workers that I've ever met tend to make a decent - granted anecdotal - case that the field is drastically hostile to women and minorities.
Few things they seem to love as much as sitting around complaining about how unfair life is for the white men who have to deal with anything resembling affirmative action.
well, sure, but there are also lots of women engineers and doctors and scientists
not as many as there would be if the culture weren't so cro-magnon, i'll grant
but I don't think a female host on a science program is the way we're going to solve that problem
Yeah I'll agree to that, but mainly because systemic racism and sexism do not seem amenable to being solved except with a bunch of small, not-individually-causal effects: the ripple effects of a lot of different and broadly visible role models who contravene stereotypes, the collective effects of a lot of people deciding they should See Something, Say Something in their daily lives.
kedinik on
I made a game! Hotline Maui. Requires mouse and keyboard.
@desc i post that thinking u might change avatar lol
@skippydumptruck this was in reply to your tree thing and how you are not a tree but a hog and yes ur advice
poo
+2
Options
LudiousI just wanted a sandwich A temporally dislocated QuiznosRegistered Userregular
edited March 2014
Will has scared me off properly of getting a suit. I am wearing a pair of my Savane slacks and an off the shelf claiborne button up to pax. I will get a tie. There are too many opinions on suits. Fuck it all.
Posts
this is a question about how array indices are handed and it's language specific
some start with 0 as the first index and some start with 1
it seems like to me that word[1:len(word)-2] should be correct but possibly the language you're using uses a non-inclusive final index in a range? it seems squirrelly to me
@desc @skippydumptruck
So that's what the first 35 seconds of a Vampire Weekend song sounds like
The second.
ugh
my grandparents were in a lot of ways really dignified and admirable people
but they were ignorant as sin
True dat.
Choose Your Own Chat 1 Choose Your Own Chat 2 Choose Your Own Chat 3
I'm sorry this discussion has caused you unhappiness. Can I make a suggestion?
oh, okay
*googles python index ranges*
NO ONE CARES WHAT SUIT YOU'RE WEARING WHEN YOUR FEET HAVE BURNED OFF TO THE ANKLES BECAUSE YOU WERE TOO BUSY JIBBY JABBERING ON THE INTERNET TO FORMULATE A PROPER EVACUATION PLAN
He sold them as well.
His father was a tailor.
So not so much blue collar as my mom's side.
But I am on board with the difference in clothing is as much about availability and just fashion trends then some need to dress in a suit or suit like clothing.
To extract a substring in Python, we use the syntax
S[firstIndex:tailIndex]
to get the substring starting at index firstIndex and ending at tailIndex-1.
ur da bes maybe
what's all this
Pre-fifties clothing looks like suiting because the materials and techniques to make anything else either didn't exist or weren't commonplace
as half djinn half jawa born under the twin sons of tatooine with heirloom +5 brimstone firebrand karyt dragon pearl rings I have a natural immunity to lava
engineering is significantly more hostile than medicine
Medicine is full of women, it just suffers from the broader societal issues quite visibly
Hmm
Would chat disown me if I changed my avatar y/y
Sure.
I'd argue it was WWII, basically.
Cloth rationing provided a disincentive to wear things like vests and ties. Even items that weren't directly rationed (like hats) became more expensive. That's the point at which vests and ties became class signifiers.
Meanwhile photos were filtering back in to the US of off-duty GIs in barracks sitting around in white t-shirts. I think that cemented a cultural stereotype of the rugged casual-wear American hero, which led to Marlon Brando and James Dean rocking the jeans-and-t-shirt look in movies.
the "no true scotch man" fallacy.
Funerals, which have been the majority of times I have ever worn one myself, and my father, because he wears them all the time to work and most social events.
There is a lot of emotional baggage I associate with suits as a result that, while not preventing me from actively wearing them, does make me feel profoundly uncomfortable in them.
Meanwhile in the 21st century we've got moisture-wicking tees and white Jordans for days
Edit:
PSN/XBL: Zampanov -- Steam: Zampanov
you jump from the couch to the coffee table, obvs, then use the couch cushions as stepping stones until you get to a lava-free zone
What is all this tomfoolery
management material right here
To that end I propose future clothes be a hybrid of present day clothes and Mass Effect clothes.
i mean i am not championing all rules for their own sake
but i do think the modern american ethic of radical individualism is harmful. i'm not a communist but i do believe in communitarianism - we all exist in society and need to understand and be mindful of who we are from the perspectives of other people and our various society as a whole.
we need to be a good son and a good brother and a good neighbor and a good colleague and a good citizen.
and part of that means that we follow social rules that we didn't independently invent sometimes. we don't pick our noses at the table and we don't spit on the street and we take off our hats indoors and we say please and thank you and we shower at least once a week and we don't wear our larp gear to a funeral.
and maybe it feels like i'm some kind of 1960s square revanchist, but i don't think that the continuing lessons of the hippie movement has really done our culture any favors
What are you doing in me, Desc?
How many people have you let in?
Check out my site, the Bismuth Heart | My Twitter
The South West has a different style of work clothing compared to Southern Cali compared to Northern Cali compared to the Northeast and so on.
Some of it is due to weather. If it is 75F and sunny 80% of the year it makes less sense to wear wool suits all the time but more casual and light clothing is more practical. While if it is cool and rainy a wool suit is more functional. Then you get a conservative dress culture verse more liberal dress culture and the influence of office politics and culture. A non-profit will be more relaxed compare to a government office or a wall street trader's office.
lol
the point is that you need to know how to engage the world on its own terms rather than demand the world engage you on your own terms.
because, generally speaking, it won't.
Yeah I'll agree to that, but mainly because systemic racism and sexism do not seem amenable to being solved except with a bunch of small, not-individually-causal effects: the ripple effects of a lot of different and broadly visible role models who contravene stereotypes, the collective effects of a lot of people deciding they should See Something, Say Something in their daily lives.
The whole world
Sorry but everyone's in
@skippydumptruck this was in reply to your tree thing and how you are not a tree but a hog and yes ur advice