Jump to content
  • 0

Python String Count() Method


Question

Posted

Hi all im wondering how to define more than 1 item

for example this: 

def onEvent(self,event,st):
		htmltext = event
		count=st.getQuestItemsCount(Item1)
		count=st.getQuestItemsCount(Item2)

 

2 answers to this question

Recommended Posts

  • 0
Posted

Do you mean something like this?

 

count1 = st.getQuestItemsCount(Item1)
count2 = st.getQuestItemsCount(Item2)

if count1 > 0 and count2 > 0:
    # some code
 

  • 0
Posted

Do you mean something like this?

 

count1 = st.getQuestItemsCount(Item1)

count2 = st.getQuestItemsCount(Item2)

if count1 > 0 and count2 > 0:

    # some code

 

mm not working with this method.

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..