No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
2 Posted Topics
I have these 3 string: YELLOW,SMALL,STRETCH,ADULT,T21fdsfdsfs YELLOW,SMALL,STRETCH,ADULT,Tdsfs YELLOW,SMALL,STRETCH,ADULT,TD I would like to remove everything after the last "," including the comma. So i want to remove these parts ",T21fdsfdsfs" ",Tdsfs" and "TD". How could i do that in Python? | |
I'm trying to put a 2 dimensional array in a queue... How could I do that? #include<iostream> #include<queue> using namespace std; struct state { int puzzle[2][2]; }; int main() { state p; p.puzzle[0][0]=1; p.puzzle[0][1]=2; p.puzzle[0][2]=3; p.puzzle[1][0]=8; p.puzzle[1][1]=0; p.puzzle[1][2]=4; p.puzzle[2][0]=7; p.puzzle[2][1]=6; p.puzzle[2][2]=5; queue<int> Queue; Queue[front] = p; while(!Queue.empty()) { cout<<" "<<Queue.front()<<endl; … |
The End.