Getting Input into separate array indexes in Python
<p>I'm trying to make a program that will take an input in and put it into an <code>array</code> so that it can then be used later on in the program.</p>

<blockquote>
  <p>How do you get the input into separate indexes (not sure that's the right word) in an array?</p>
</blockquote>

<p>I've tried entering the input with commas but all it does is it counts the commas as part of the string and when I try to print the sequence[0:4](for example) it prints out the input counting the commas in giving me this:</p>

<pre><code>#Code
sequence = [""]
sequence = input("Please enter a sequence:\n")
print(sequence[0:4])
</code></pre>

<p>This gives me this:</p>

<pre><code>Please enter a sequence:
R,B,G,R,B,G #Input
R,B, #Output
</code></pre>

<p>I would like this to print out:</p>

<pre><code>R,B,G,R
</code></pre>

<p>Is their any way of doing this and if so how?</p>