How to create variable dynamically : I want to create table depending on user input value. But of max 7 column with first column as name of row, when user enters 9 value then it should create next table with two column. Then to those table i am giving value later in the prog from some computation.

I tried this code but getting error 
    
    vr={}
    num=0
        for num in range(1,k):
            print site_count
            print 'num is',num
    
    vr[str(num)]=document.add_table(rows=13, cols=(7))
    print vr['1']
    
    for num in range(1,k+1):
        vr['num'].cell(1, 0).text='Subscribed BW'
        vr['num'].cell(2, 0).text='Peak LAN'
        vr['num'].cell(3, 0).text='Peak WAN-IN'
        vr['num'].cell(4, 0).text='Peak WAN-OUT'
        vr['num'].cell(5, 0).text='Recommended BW Capacity'
        vr['num'].cell(7, 0).text='Peak Compression'
        vr['num'].cell(9, 0).text='Optimized Traffic'
        vr['num'].cell(10, 0).text='Optimized Traffic%'
        vr['num'].cell(12, 0).text='Key Applications'
        vr['num'].style ='TableGrid'

 **ERROR as:**    vr['num'].cell(1, 0).text='Subscribed BW'
KeyError: 'num'

Is there any other solution 