在Notepadd ++(或Excel)中分类到分段

时间:2017-10-12 17:30:40

标签: excel sorting notepad++

我有一个键列表,其中包含与之关联的产品名称。我有相同产品和多个产品的多个键。列表可能如下所示:

1234567    Adobe
7654321    Adobe
1237731    Adobe
2374792    MS Office
1231031    MS Office
1231312    MS Office
1237131    IntelliJ
1238981    IntelliJ
3495729    IntelliJ

我如何在Notepadd ++(或Excel)中对其进行排序,结果如下:

1234567    Adobe
2374792    MS Office
1237131    IntelliJ

7654321    Adobe
1231031    MS Office
1238981    IntelliJ

1237731    Adobe
1231312    MS Office
3495729    IntelliJ

1 个答案:

答案 0 :(得分:0)

假设{C2}中的#item { background: url("/images/my_image.png") center center no-repeat; background-size: cover; } @media all and (-webkit-min-device-pixel-ratio: 1.5), all and (-o-min-device-pixel-ratio: 3 / 2), all and (min--moz-device-pixel-ratio: 1.5), all and (min-device-pixel-ratio: 1.5) { #item { background: url("/images/my_image@2x.png") center center no-repeat; background-size: cover; } } @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { #item { background: url("/images/my_image@2x.png") center center no-repeat; background-size: cover; } } @media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) { #item { background: url("/images/my_image@3x.png") center center no-repeat; background-size: cover; } } 在A2中并且被复制到一个'设置'空白行:

import random
print "Rock. Paper. Scissors. Awesome, a quick project made by me"

a = ["R", "P", "S"]
Ai = 0
Player = 0
samples = ['R']
l = 't'
c = random.choice(a)
play = 0
rndm = ['r.c', '+', '-']
count = 0
max = len(samples)
it = 0

def learn():

    global rndm
    global samples
    global Ai
    global Player
    global l
    global play
    global c
    global max
    global it

    number = random.randint(1,5)

    if l == 'p':
        #Random Learning
        choice = random.choice(rndm)
        if choice == "-":
            choicetwo = random.randint(0,len(samples))
            if choicetwo == len(samples):
                choicetwo -= 1
            samples.pop(choicetwo)
            if len(samples) == 0:
                q = random.choice(a)
                samples.append(q)
        if choice == "+":
            q = random.choice(a)
            samples.append(q)
        if choice == "r.c":
            choicetwo = random.randint(0,len(samples))
            if choicetwo == len(samples):
                choicetwo -= 1
            samples.pop(choicetwo)
            samples.insert(choicetwo,random.choice(a))
    if l == 'a':
        if it > max:
            it = 0
            print "oh"

        if it < max:
            it += 1
            it1 = it - 1
            c = samples[it1:it1 + 1]
            print "Ok"
    loop()

def loop():

    global a
    global Ai
    global Player
    global l
    global c
    global play

    b = raw_input("R, P, or S? :")
    b = b.upper()

    if b != "R" and b != "P" and b != "S":
        loop()

    elif b == "R" and c == "S":
        print "Rock .VS. Scissors"
        print "You win!"
        Player += 1
        l = 'p'
    elif b == "R" and c == "P":
        print "Rock .VS. Paper"
        print "You lose!"
        Ai += 1
        l = 'a'
    elif b == c:
        print "Tie!"
        l = 'p'
    elif b == "R" and c == "R":
        # Just for errors
        print "Tie!"
        l = 'p'

    elif b == "P" and c == "R":
        print "Paper .VS. Rock"
        print "You win!"
        Player += 1
        l = 'p'
    elif b == "P" and c == "S":
        print "Paper .VS. Scissors"
        print "You lose!"
        Ai += 1
        l = 'a'
    elif b == "S" and c == "R":
        print "Scissors .VS. Rock"
        print "You lose!"
        Ai += 1
        l = 'a'
    elif b == "S" and c == "P":
        print "Scissors .VS. Paper"
        print "You win!"
        Player +=1
        l = 'p'

    print ""
    print "Ai: " + str(Ai) + ", Player: " + str(Player)
    print ""
    play += 1

    learn()
loop()

&#39;设置&#39;是每个产品之一。然后将ColumnC Smallest上的所有内容排序为最大(带标题行)。