New to Python and am having a problem with getting items into individual elements of a list.  I am walking through a subdirectory list and want to write each subdirectory to a separate dimension on a list. So my output would be:  [['roll_274_oe_2014-09-26', ['roll_275_oe_2014-10-03'], ['roll_276_oe_2014-10-10'], ['roll_277_oe_2014-10-17']]   but instead it looks like I'm iterating through the directory tree the number of times I have the output:  [['roll_274_oe_2014-09-26', 'roll_275_oe_2014-10-03', 'roll_276_oe_2014-10-10', 'roll_277_oe_2014-10-17'], [], [], [], []]   my code to do this is at present:  d = 'C:/winPython/WinPython-64bit-3.3.5.5/scripts/portofolio/'       s1 = []  for path, subdirs, files in os.walk(d):      s1.append(subdirs)       print(s1)    I hope someone can give me a hand.  Many thanks
What's the difference between the list methods append() and extend()?
Cartoon: 4 kids transform into video game characters to save the world from a hacker and an evil program There are 4 friends: 2 girls and 2 boys who play video games. A virus program escapes and, with the help of a programmer boy, transforms the world into a video game. But a good program in a white robe turns the four of them into video game characters to save the world.  The evil virus mostly looked like The Tick from the cartoon "The Tick". Big strong guy with muscles but in red spandex. Little head with antenas, BIG chin and evil mustache.  One hero is the typical blonde girl who can scream loudly with a microphone or headphones. The other chick was shorter, more a grumpy type and with her big metal boots she was able to rock / shake the ground. There was also a funny white boy with red hair, he was a cyber archer. And their black-skinned friend, a typical tech guy with maybe one laser eye.  The transformed world has always had a theme: a swamp, a volcano,  space, a cyber city, a sewer, once a pinball machine, and so on. For some game points they were able to summon different vehicles, weapons and reinforcements/buffs.  The story is made up of the usual repetitive events: every day the hacker guy transforms the world or just the city with a wicked program. Summoning new monsters and obstacles for stopping the good guys to defeat him.  But our heroes always win and the evil program comments what a loser he is and the guy get frustrated.  (In the end, they convince the hacker guy that it just using him and he chose the good side then they wiped out the evil program forever.) - NOPE XD  Not Code Lyoko, ReBoot, Linkers, Cyberchasers. There is no 3D; it was fully hand drawn. I think it was American, but was definitely not Japanese and there was no anime-like stuff. I was young when I saw it, i'm live in a foreign country Hungary. So i dont know when was it released, but maybe before 2005. The main group maybe has something "force" in their name. I'm used to doing all my coding in one C file. However, I'm working on a project large enough that it becomes impractical to do so. I've been #including them together but I've run into cases where I'm #including some files multiple times, etc. I've heard of .h files, but I'm not sure what their function is (or why having 2 files is better than 1).  What strategies should I use for organizing my code? Is it possible to separate "public" functions from "private" ones for a particular file?   question precipitated my inquiry. The tea.h file makes no reference to the tea.c file. Does the compiler "know" that every .h file has a corresponding .c file? I have an AMD Radeon R7 M265, and when I force OPENCL with the batch file it only shows Iceland, Intel HD and the CPU.  I followed this instructions:   R, type CMD, press &#9166; Enter, go to your blender folder. ex:  cd C:\Program Files\Blender Foundation\Blender  Press &#9166; Enter and then type: set CYCLES_OPENCL_TEST=all Start Blender with blender.exe Inside blender go to File -> User preferences -> System Under compute device select OpenCL and then your card Close the preferences and go to the render panel and select device: GPU Compute.  I have the latest beta driver from AMD, but when I try to change the compute device it only shows this list:     Am I doing something wrong? Is my GPU is not supported? Or is it because it's in development and not every card is supported yet?  I've tried blender v2.74.5, v2.62, and v2.63. Every one gives the same list. Prove that $|f''(\xi)|\geqslant\frac{4|f(a)-f(b)|}{(b-a)^2}$ Let ${\rm f}:\left[a, b\right]\to\mathbb{R}$ be twice differentiable, and suppose   $$\lim_{x\to a^{+}} \frac{{\rm f}\left(x\right) - {\rm f}\left(a\right)}{x - a} = \lim_{x\to b^{-}}\frac{{\rm f}\left(x\right) - {\rm f}\left(b\right)}{x - b} =0 $$  Show that there exists $\xi \in \left(a, b\right)$ such that $\displaystyle{% \left\vert\vphantom{\Large A}\,{\rm f}''\left(\xi\right)\right\vert \geq \frac{4\left\vert\vphantom{\Large A}% \,{\rm f}\left(a\right) - {\rm f}\left(b\right)\right\vert} {\left(b - a\right)^{2}}}$.  I don't know how to start. Any hints ?. Hitting arrow keys adds characters in vi editor When I tried to use arrow keys in insert mode in vi editor the following characters are being inserted in the editor:   for ↓ I get B, for ↑ I get A, for ← I get D, for → I get C.   Please help me in resolve this problem. I read this book a few years ago which was part of a series, but I only found the first book and now I've forgotten the name.  The first book featured 3 children/teens from different places that end up on a quest to search for magic gems/stones together and the story takes place in a medieval kind fantasy world. One is a girl, while the other 2 are boys. One of the boys actually finds a stone/gem while he is on a school field trip (I think the gem/stone is red in colour), and when he picks it up, he gets transported to the fantasy land but ends up in some sort of military training ground/camp somewhere in a desert type area.  He isn't familiar with the fantasy world. The other 2 characters each start out on their own on a quest to collect some magical gems/stones which once collected, can be used to fight an evil ruler (I guess).  But halfway through the book, the girl and boy meet up and continue the quest together while the third boy(transported one) doesn't know that the stone he picked up is actually one of the magical stones others are looking for.  A few other details I remember:   The stone the boy finds is red in colour I think  The cover of the book had a border depicting the stones  It's part of a series or trilogy    Some books with similar storylines, but not the one I'm looking for:     Deltora Quest The Seven Towers Sword of Heaven series Westeria series Diadem series Is it possible to know from apt if the package was installed explicitly or as a dependency of another package? Application of Kolmogorov's Zero-One Law Most of the books I read, they only state some examples of tail events. One of them is  $[\sum_n X_n \ converges]$. My main problem is to show that this is indeed a tail event. Uncountable $\sigma$-algebra I'm stuck on the following problem (Source: Real Analysis for Graduate Students; Exercise 2.6; ):     Suppose $\mathcal A$ is a $\sigma$-algebra with the property that whenever $A \in \mathcal A$, there exists $B, C \in \mathcal A$ with $B \cap C = \emptyset$, $B \cup C = A$, and neither $B$ nor $C$ is empty. Prove that $\mathcal A$ is uncountable.   I think there is the added assumption that this is only true for $A \in \mathcal A$ having at least two elements, so it doesn't hold for singletons and the emptyset?  I tried to show this by way of contradiction and say that $\mathcal A = \{A_k\}$ is countable, but I didn't see how this could get me to a contradiction.  The other approach I tried was to look at $X = B_1 \cup C_1$ where $B_1 \cap C_1 = \emptyset$, then look at $B_1 = B_2 \cup C_2$ where $B_2 \cap C_2 = \emptyset$ and so on. If I look at the $C_k$'s they are pairwise disjoint and I either have a finite number of them or an infinite number of them in which case I've created a countable sequence of pairwise disjoint nonempty elements of $\mathcal A$. This path looked promising, but I couldn't see what to do next. Any ideas?  As a secondary question: I think this result is supposed to be used to show that if $\mathcal A$ is a $\sigma$-algebra with infinitely many elements, then it's uncountable, but I wasn't able to show that the property mentioned above (the one I'm trying to show) was satisfied in this case. How do I change the Google Play country? Can someone tell me how to change the country preference for Google Play? I have searched high and low but in most of the forums people ask you to go to Gmail settings -> edit profile and change the country there. But there is no place to change the country in settings! There is a something called place (which can be marked as current) but that has no impact on Google Play.  I don't want to circumvent country restrictions, I want to permanently change the country. So it's NOT a duplicate of . How do you get a bad transcript past Ph.D. admissions? Dihedral group - elements of order $2$ What is the proper way of creating installation media from Ubuntu iso? What are the rules about take a bike on the London Tube? Can I take a bike on the Tube (underground) in London, if so how much does it cost? What happens when a caster targets an object that looks like a creature with a spell that targets only creatures? Two rotating discs with same angular momentum when brought in contact completely stop. Why is the angular momentum not conserved in this case? Two discs mounted on different thin, lightweight rods oriented through their centres are made to rotate about their axes seperately such that the angular momentum of the two about their respective axes is same in both magnitude and direction. When both are brought in contact, they stop due to force of friction. Why is the angular momentum not conserved about their axes in this case?(Was positive before contact, but zero after the process completes, no external force present either) I'm having a problem finding out a way to project from top view and the side view so I texture better. It just replaces the current projection with the top view    So is it possible to project from view twice on the same image? Solving infinite sums with primes. Let $p_n$ denote the $n$'th prime number.  How would one go about proving that infinite products like: $$\prod_{k=1}^\infty1 - \frac{1}{(p_k)^2} = \frac{6}{\pi^2}$$  or  $$\prod_{k=1}^\infty\frac{{p_k}^2}{{p_k}^2 - 1} = \frac{\pi^2}{6}$$ are correct?  Is there any way to prove it except by exhaustion? How to prove that we are living in a 3+1D world? RF Energy Harvesting Why can energy invested in RF radiation not be harvested fully? What are the main factors that affect this? Is there any significant research nowadays that fully describes this process? I stand on the conclusion: "Energy moves from one form to another.", but in this case why can it not be harvested in that quantity to use it for powering low-power devices or store it in significant quantities in some batteries for later use? Why is it not profitable nowadays and why is it not used today like energy from water, wind and other energy sources?