title: How to print 3 dice on one horizontal line in python
body: <p>I have this code in python, the code prints each dice vertically by entering (r) instead of horizontally. Does anyone know how to edit this code to print 3 dice horizontally?</p>
  <p><a href="https://i.stack.imgur.com/mLzSy.jpg" rel="nofollow noreferrer">Screenshot</a></p>
  <pre><code>import random
  
  x = &quot;r&quot;
  
  while x == &quot;r&quot;:
    no = random.randint(1,6)
    if no == 1: 
      print(&quot;[-----]&quot;) 
      print(&quot;[     ]&quot;) 
      print(&quot;[  0  ]&quot;) 
      print(&quot;[     ]&quot;) 
      print(&quot;[-----]&quot;)
    if no == 2: 
      print(&quot;[-----]&quot;) 
      print(&quot;[ 0   ]&quot;) 
      print(&quot;[     ]&quot;) 
      print(&quot;[   0 ]&quot;) 
      print(&quot;[-----]&quot;) 
    if no == 3: 
      print(&quot;[-----]&quot;) 
      print(&quot;[     ]&quot;) 
      print(&quot;[0 0 0]&quot;) 
      print(&quot;[     ]&quot;) 
      print(&quot;[-----]&quot;)
    if no == 4: 
      print(&quot;[-----]&quot;) 
      print(&quot;[0   0]&quot;) 
      print(&quot;[     ]&quot;) 
      print(&quot;[0   0]&quot;) 
      print(&quot;[-----]&quot;) 
    if no == 5: 
      print(&quot;[-----]&quot;) 
      print(&quot;[0   0]&quot;) 
      print(&quot;[  0  ]&quot;) 
      print(&quot;[0   0]&quot;) 
      print(&quot;[-----]&quot;) 
    if no == 6: 
      print(&quot;[-----]&quot;) 
      print(&quot;[0 0 0]&quot;) 
      print(&quot;[     ]&quot;) 
      print(&quot;[0 0 0]&quot;) 
      print(&quot;[-----]&quot;)  
  
    x=input(&quot;press r to roll again or e to exit:&quot;) 
  
    print(&quot;\n&quot;)
  </code></pre>