title: special serial number generator
body: <p>Please, I am building an app with python and want to generate serial numbers for people that register on my app, but I don't really know how to go about it. </p>
  
  <p>the serial number is supposed to be of the format 1JA002, where the first number '1' determines the function or department of the user, the first two letters are extracted from the first and the last name in that order, but the last three digits are developed based on the time you register, for instance the very first person to register will have a number '001' as his number and these digits must just be three. </p>
  
  <p>Also the last three digits are also dependent on the arrangement of the letters, so if two persons have letters 'AA' from their first and last name and they were to register at the same time, the second letter from the first name is used to separate the individuals and also give them their corresponding numbers.</p>
  
  <p>#   below is my code and where I got stuck!!</p>
  
  <pre><code>firstName='sam'   # example names 
  LastName='john'
  f=firstName
  L=lastName
  po=f[0]
  ko=L[0]
  firstUser='001'
  def numbergen():#function to generate serial code
      count=0
      SerialNumber=''
      while True:
          if count==0:#count indicates the number time the user registered
              if (po&lt;ko) or (po&gt;ko) or (po==ko):
                  SerialNumber+='1'+'po'+'ko'+firstUser
          count+=1
          if count==1:#serial number generation for very next user
              initialUser='002' # the very second user
  </code></pre>