Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 56 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. # userName = ['Name1', 'Name2']
  2.     userName = ['Name1', 'Name2', 'Name3', 'Name4', 'Name5', 'Name6', 'Name7', 'Name8']
  3.     # userName = ['Name1', 'Name2', 'Name3']
  4.  
  5.     html_card = ''
  6.     for count, element in enumerate(userName, 1): # Start counting from 1
  7.  
  8.         # ADDING HTML ROW
  9.         if count % 4 == 0 or count == 1:
  10.             html_card += '<div class="row">'
  11.  
  12.         # ADDING HTML CARD COL
  13.         html_card += '''n<div class="col">
  14.                         <div class="card card-block">
  15.                           <div class="card mb-4 border-primary">
  16.                                 <div class="card-header bg-primary">{element}</div>
  17.                                 <div class="card-body text-primary">
  18.                                   <h4 style="color:#0069d9" class="card-title">{element} Performance Runs</h4>
  19.                                   <p style="color:#0069d9" class="card-text"></p>
  20.                                   <button type="button" class="btn btn-primary" value="Show Div" onclick="showDiv()">Available Runs</button>
  21.                                 </div>
  22.                              </div>
  23.                         </div>
  24.                     </div>n'''.format(element=element)
  25.  
  26.         # ADDING HTML ROW DIV
  27.         if count % 4 == 0 or element == userName[-1]:
  28.             html_card += '</div>n'
  29.  
  30.         print(html_card)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top